element-hq / element-hq/dendrite

Can't leave a room that re-appeared because of "storage: state NIDs missing from the database (0 != 1)"

Open
#2,229 6 comments 0 reactions 0 assignees View on GitHub
C-Federation T-Defect
Dominant language
Go
Stars
965
Forks
101
PR merge metrics
No merged PRs in 30d

Description

*This issue was originally created by [**@PureTryOut**](https://github.com/PureTryOut) at .*

### 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.

Contributor guide

Open the contributing guide

Research direction

Start by searching Dendrite for the exact error text `storage: state NIDs missing from the database (0 != 1)` and trace the leave-room request for the reported PostgreSQL setup. Reproduce the reappeared-room case if possible; done means the user can leave the room without this storage error, with regression coverage for the failure if the behavior can be reproduced.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.