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

db: weaken SINGLEDEL semantics in Iterator #3151

Open
sumeerbhola opened this issue Dec 12, 2023 · 1 comment
Open

db: weaken SINGLEDEL semantics in Iterator #3151

sumeerbhola opened this issue Dec 12, 2023 · 1 comment

Comments

@sumeerbhola
Copy link
Collaborator

pebble.Iterator treats SINGLEDEL the same as DEL, under the assumption that SINGLEDEL has been correctly used. However, if used incorrectly (e.g. SINGLEDEL layered above multiple older SETs), and before the incorrect behavior has been compacted away (either harmlessly or harmfully), user-facing iteration over the data will hide the incorrectness.
If we treat SINGLEDEL as deleting only a single SET, then the incorrectness will be visible -- this may be better in tests, and in replica divergence detection.

Relates to cockroachdb/cockroach#116218 cockroachdb/cockroach#114421

@jbowens

@jbowens
Copy link
Collaborator

jbowens commented Dec 12, 2023

There's a complication here with the obsolete bit, right? Do you have any ideas on how to work around that?

Edit: Oh, if a single delete removes a key within the same sstable, we could treat both as obsolete?

@nicktrav nicktrav moved this from Incoming to Backlog in Storage Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Storage
  
Backlog
Development

No branches or pull requests

2 participants