Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LevelDB: corrupted database returning an innocuous error #8868

Open
codingismy11to7 opened this issue Mar 1, 2024 · 0 comments
Open

LevelDB: corrupted database returning an innocuous error #8868

codingismy11to7 opened this issue Mar 1, 2024 · 0 comments

Comments

@codingismy11to7
Copy link

I've run into an issue where our upsert implementation loops forever, because db.get always returns a 404, and db.put always returns a 409. After debugging, I've determined that the metadata for the document returns a rev and a winningRev, deleted: false, a large rev_tree an an empty rev_map. so the following line assigns undefined to seq:

it then tries to get a doc with key 0000000undefined, which is, of course, not found, and just returns a 404 not found error.

I'm not sure how the data got corrupted, and not sure how I'm going to work around it yet, but it seems that the code should be returning a different error if the revision is missing from the rev_map, which appears to be an unexpected state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant