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: prefix replacement fixes #3322

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

RaduBerinde
Copy link
Member

@RaduBerinde RaduBerinde commented Feb 20, 2024

The prefix replacing iterators did not support arguments that don't
start with the synthetic prefix. We fix this by adding a keyInRange
argument that we can compare against when we are outside the synthetic
prefix range to figure out which side we are on.

We also fix assertions in maybeVerifyKey which were not correct when
prefix replacement is used.

Fixes #3319.

@RaduBerinde RaduBerinde requested review from dt, itsbilal and a team February 20, 2024 20:09
@cockroach-teamcity
Copy link
Member

This change is Reviewable

The prefix replacing iterators did not support arguments that don't
start with the synthetic prefix. We fix this by adding a `keyInRange`
argument that we can compare against when we are outside the synthetic
prefix range to figure out which side we are on.

We also fix assertions in `maybeVerifyKey` which were not correct when
prefix replacement is used.
@dt
Copy link
Member

dt commented Feb 21, 2024

Gave this a quick rebase to resolve the conflicts it got with the testdata changes in #3311

@RaduBerinde
Copy link
Member Author

Thanks!!

@RaduBerinde RaduBerinde merged commit 21f5b6f into cockroachdb:master Feb 21, 2024
11 checks passed
@RaduBerinde RaduBerinde deleted the prefix-fixes branch February 21, 2024 01:31
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.

prefixReplacingIterator incorrectly assumes that arguments have the synthetic prefix
3 participants