dendrite
dendrite copied to clipboard
Can't leave a room that re-appeared because of "storage: state NIDs missing from the database (0 != 1)"
Background information
- Dendrite version or git SHA: 0.6.4
- Monolith or Polylith?: Monolith
- SQLite3 or Postgres?: PostgreSQL
- Running in Docker?: No
-
go version
: 1.17.7 - Client used (if applicable): Element web in Firefox
Description
-
What is the problem: A room I left before suddenly re-appeared and now I'm unable to leave it because of
storage: state NIDs missing from the database (0 != 1)
- Who is affected: Myself, only user of my server
- How is this bug manifesting: As I said, the room re-appeared out of nothing after I already left it before and now I'm just trying to leave it again
- When did this first appear: Like 2 or so weeks ago, it doesn't seem to be related to a specific version upgrade
Steps to reproduce
I'm not sure how to best reproduce this to be honest. It happened after a room I had left before suddenly re-appeared and I'm unsure how that happened in the first place.
Have you deleted your database in the past? It's likely that another server has told you that you're in the room and Dendrite is trying to reconcile that. It's probably failing to do this such that you now cannot leave that room. I'll see if I can make a Complement test for this.
Also, just to check, this is a federated room right?
It is a federated room yes. I have not deleted a Dendrite database in the past but I have switched from Synapse to Dendrite without transferring the database, although that was like 1 to 2 years ago.
The failure mode will most likely be that one server thinks you're in the room via your old Synapse, but Dendrite knows nothing about this. Either way, we should be handling this case a lot better.
Well I used to be in this room with Dendrite too but I left most rooms a while ago in an effort to get incoming federation performant again. It didn't help sadly but I'd assume that particular server would have seen the leave event.
Same here. I'm getting the same issue even though I joined with dendrite server before.