-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Add deltaiterator upperbound check #11662
Conversation
Seems to fix the issue described in #2343 ( |
@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@cz2h has updated the pull request. You must reimport the pull request before landing. |
@ajkr @jsteemann Many thanks for the quick review. Kindly format the code to pass the last styling test. |
@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@@ -307,7 +312,8 @@ void BaseDeltaIterator::UpdateCurrent() { | |||
if (comparator_->CompareWithoutTimestamp( | |||
delta_entry.key, /*a_has_ts=*/false, *iterate_upper_bound_, | |||
/*b_has_ts=*/false) >= 0) { | |||
// out of upper bound -> finished. | |||
// out of upper bound -> delta finished. | |||
delta_iterator_out_of_bound_ = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we reset delta_iterator_out_of_bound_
to false when a user calls Seek* again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point... we should probably pass the upper_bound down to the WBWIIteratorImpl and have it do the upper-bound check normally, i.e., by returning Valid() == false
upon reaching the upper-bound.
Another usage of |
@cz2h has updated the pull request. You must reimport the pull request before landing. |
Fixes issue 11606.
Fixes #2343.
Fix problem of WBWIIteratorImpl not disabling itself when it's delta iterator is at entry out of upperbound.