bug: Work around rocksdb#13333 #1122
Labels
No labels
Blocked
Bug
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
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
To-Merge
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity#1122
Loading…
Add table
Add a link
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?
https://github.com/facebook/rocksdb/issues/13333 - seems to have caused issues recovering many people's databases at this point - for example, #1107. Investigate workarounds for this - either changing our WAL config to enable compression, or patching out the mentioned deadlock.
Would rather the enabling compression method than carrying another patch coming from the perspective of a nixpkgs maintainer ;p.
FWIW, while trying different repair options for #1107, I found this (TY for the mention, that's how I got here), clicked through to https://github.com/facebook/rocksdb/issues/13333, and said "cool, I'll try just reverting https://github.com/facebook/rocksdb/pull/12643" - but it turned out it was already reverted in v0.5.0-rc.6, which is what I was running
That said, it doesn't seem to be in rc.8; I'm currently attempting repair using that, will report back if it seems to be any better
Copying this from matrix so it doesn't get lost like prior solutions:
FTR for anyone encountering this, the manual fix is to build
https://forgejo.ellis.link/continuwuation/rocksdb/src/branch/10.4.fb
With
continuwuation/rocksdb@3ce04794bcCherry picked on topp
And run
ldb repair(iirc)Against your database
Since I ran into the problem myself and had some trouble following the steps, here is a bit more detailed description if someone else runs into the same problem.
For me it was caused by running out of disk space recovery did not work.
I checked out the branch mentioned by jade:
git clone git clone https://forgejo.ellis.link/continuwuation/rocksdb.gitthen
cd rocksdbinto the directory and checked out the branch.git checkout 10.4.fbthe cherry pick was just
git cherry-pick 3ce04794bcAfterwards I needed to build not just RocksDB, but the tool
ldbfor the repair. Regular make failed because warnings were treated as errors, I circumvented it with a parameter to build:make ldb DISABLE_WARNING_AS_ERROR=1This build succeeded and I could call the tool to repair the database. It needed a path to the directory and another parameter to ignore a version mismatch, since my version was newer than the one we just built, therefore the last step was:
sudo ./ldb --db=/var/lib/conduwuit repair --ignore_unknown_optionsSudo so it could read the database directory.
Afterwards continuwuity started normally for me again. Hope it helps someone.