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: fix newly-introduced SINGLEDEL+DELSIZED bug #3088

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

jbowens
Copy link
Collaborator

@jbowens jbowens commented Nov 18, 2023

In bfb2e6a (#3081) a small refactor the handling of DELSIZED introduced a bug when a DELSIZED shadows a SINGLEDEL. When a DELSIZED and a SINGLEDEL meet in a compaction, we began accidentally emitting a SINGLEDEL rather than a DEL, weakening the tombstone. Previously the problematic code branch was only ever executed when a DELSIZED and DEL met, so iterKey.Kind() was always DEL.

Fix #3087.

In bfb2e6a (cockroachdb#3081) a small refactor the handling of DELSIZED introduced a bug
when a DELSIZED shadows a SINGLEDEL. When a DELSIZED and a SINGLEDEL meet in a
compaction, we began accidentally emitting a SINGLEDEL rather than a DEL,
weakening the tombstone. Previously the problematic code branch was only ever
executed when a DELSIZED and DEL met, so iterKey.Kind() was always DEL.

Fix cockroachdb#3087.
@jbowens jbowens requested review from sumeerbhola and a team November 18, 2023 17:34
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the quick fix!

@jbowens
Copy link
Collaborator Author

jbowens commented Nov 19, 2023

tftr!

@jbowens jbowens merged commit b9be64b into cockroachdb:master Nov 19, 2023
11 checks passed
@jbowens jbowens deleted the fix-citer branch November 19, 2023 03:25
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

Successfully merging this pull request may close these issues.

github.com/cockroachdb/pebble/internal/metamorphic: TestMeta failed
3 participants