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

storage: fix EngineComparer ordering of bare suffixes #75447

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

erikgrinaker
Copy link
Contributor

For generalized range key support, Pebble now requires bare key suffixes
to be comparable with the same ordering as if they had a common user key
prefix (see cockroachdb/pebble#08c5d46c75722b9527c360ca1e7069c0d2286e59).

This patch modifies EngineComparer to satisfy that requirement.
Previously, such suffixes would sort in ascending timestamp order
rather than the correct descending order.

Release note: None

For generalized range key support, Pebble now requires bare key suffixes
to be comparable with the same ordering as if they had a common user key
prefix (see [cockroachdb/pebble#08c5d46c75722b9527c360ca1e7069c0d2286e59](cockroachdb/pebble@08c5d46)).

This patch modifies `EngineComparer` to satisfy that requirement.
Previously, such suffixes would sort in ascending timestamp order
rather than the correct descending order.

Release note: None
@erikgrinaker erikgrinaker requested a review from jbowens January 24, 2022 16:43
@erikgrinaker erikgrinaker self-assigned this Jan 24, 2022
@erikgrinaker erikgrinaker requested a review from a team as a code owner January 24, 2022 16:43
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

:LGTM:

Reviewed 2 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @erikgrinaker)

@erikgrinaker
Copy link
Contributor Author

bors r=jbowens

@craig
Copy link
Contributor

craig bot commented Jan 24, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jan 25, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jan 25, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jan 25, 2022

Build succeeded:

@craig craig bot merged commit 1c4b0dd into cockroachdb:master Jan 25, 2022
@erikgrinaker erikgrinaker deleted the enginecomparer-bare-suffix branch February 14, 2022 12:16
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.

3 participants