storage: add noop behavior for bounds setting in pebbleIterator#61194
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Mar 1, 2021
Merged
storage: add noop behavior for bounds setting in pebbleIterator#61194craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
jbowens
approved these changes
Mar 1, 2021
Contributor
jbowens
left a comment
There was a problem hiding this comment.
Reviewed 3 of 4 files at r1.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @itsbilal, @nvanbenschoten, @petermattis, and @sumeerbhola)
pkg/storage/pebble_iterator.go, line 197 at r1 (raw file):
} } if !boundsChanged && upperBound != nil {
if upperBound != nil {
This is to compensate for the bug fix in Pebble which removes the noop behavior from Pebble cockroachdb/pebble#1073 Added a test that checks that the noop behavior is working, the contract regarding slice stability is followed, and that the bounds are correct. Additionally, there are some minor tweaks involving removal and addition of some defensive code. The additions are related to the pebbleIterator.reusable field. Release justification: Fix for high-severity bug in existing functionality. The Pebble bug fix that needs to be compensated here could lead to incorrect results from iterators, even prior to the latest seek optimization in Pebble (though our existing tests were not failing prior to that latest seek optimization). Release note: None
sumeerbhola
commented
Mar 1, 2021
Collaborator
Author
sumeerbhola
left a comment
There was a problem hiding this comment.
TFTR!
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @itsbilal, @jbowens, @nvanbenschoten, and @petermattis)
pkg/storage/pebble_iterator.go, line 197 at r1 (raw file):
Previously, jbowens (Jackson Owens) wrote…
if upperBound != nil {
The lower bound may have changed, which means we don't need to look at the upper bound. I've added a code comment.
Collaborator
Author
|
bors r+ |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is to compensate for the bug fix in Pebble which removes
the noop behavior from Pebble
cockroachdb/pebble#1073
Added a test that checks that the noop behavior is working,
the contract regarding slice stability is followed, and that
the bounds are correct.
Additionally, there are some minor tweaks involving removal
and addition of some defensive code. The additions are
related to the pebbleIterator.reusable field.
Release justification: Fix for high-severity bug in existing
functionality. The Pebble bug fix that needs to be compensated
here could lead to incorrect results from iterators, even prior
to the latest seek optimization in Pebble (though our existing
tests were not failing prior to that latest seek optimization).
Release note: None