bug: Really old databases may have corrupt extremity tracking #2259
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity#2259
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What is the bug?
From the conduwuit era (and very early versions of v0.5), it was possible for the extremity tracking table to be completely drained of forward extremities, which would corrupt the room. It would naturally heal when a new extremity was introduced, but for the duration of the extremityless track, legal local events could not be created, and after the gapfill update, nonlinear rooms will struggle to accept incoming events since get_missing_events will panic.
This is a highly illegal situation to be in - there is never a point in time where a Matrix room's graph has no extremities. Repairing this situation can be done broadly with a simple startup migration, but this is not something that should be done automatically (huge IO load), and I don't think it's something that should be in the mainline software since it's something that affects a fraction of a minority of deployments.
Steps to reproduce
There are none anymore (the relevant codepaths fail-safe before this situation can be encountered), I'm mainly opening this issue to link to it in a comment.
Server name and version
elisaado.com (26.8.1)
Additional context
No response