Correctly handle upper bound iteration result from a UDI#13960
Closed
anand1976 wants to merge 3 commits intofacebook:mainfrom
Closed
Correctly handle upper bound iteration result from a UDI#13960anand1976 wants to merge 3 commits intofacebook:mainfrom
anand1976 wants to merge 3 commits intofacebook:mainfrom
Conversation
xingbowang
reviewed
Sep 16, 2025
Contributor
xingbowang
left a comment
There was a problem hiding this comment.
Thanks for fixing this.
Contributor
|
@anand1976 has imported this pull request. If you are a Meta employee, you can view this in D82590892. |
xingbowang
reviewed
Sep 17, 2025
Contributor
|
@anand1976 has imported this pull request. If you are a Meta employee, you can view this in D82590892. |
xingbowang
approved these changes
Sep 17, 2025
Contributor
xingbowang
left a comment
There was a problem hiding this comment.
Thank you for adding the additional test cases
Contributor
|
@anand1976 merged this pull request in 631fb86. |
xingbowang
pushed a commit
to xingbowang/rocksdb
that referenced
this pull request
Sep 17, 2025
) Summary: This PR fixes a bug in BlockBasedTableIterator::Prepare in conjunction with a user defined index (UDI). If the UDI determines a scan range to be empty and thus returns the kOutOfBound iteration result during Seek, the iteration result is not propagated up and Prepare() assumes end of file and aborts the remaining scans. This results in incorrect behavior and unpredictable multi scan results. Pull Request resolved: facebook#13960 Test Plan: Add unit test to table_test.cc Reviewed By: xingbowang Differential Revision: D82590892 Pulled By: anand1976 fbshipit-source-id: 8cfaaae2bb1a9509ddf8ec967cb8a8801748413d
xingbowang
pushed a commit
to xingbowang/rocksdb
that referenced
this pull request
Sep 17, 2025
) Summary: This PR fixes a bug in BlockBasedTableIterator::Prepare in conjunction with a user defined index (UDI). If the UDI determines a scan range to be empty and thus returns the kOutOfBound iteration result during Seek, the iteration result is not propagated up and Prepare() assumes end of file and aborts the remaining scans. This results in incorrect behavior and unpredictable multi scan results. Pull Request resolved: facebook#13960 Test Plan: Add unit test to table_test.cc Reviewed By: xingbowang Differential Revision: D82590892 Pulled By: anand1976 fbshipit-source-id: 8cfaaae2bb1a9509ddf8ec967cb8a8801748413d
xingbowang
pushed a commit
to xingbowang/rocksdb
that referenced
this pull request
Sep 18, 2025
) Summary: This PR fixes a bug in BlockBasedTableIterator::Prepare in conjunction with a user defined index (UDI). If the UDI determines a scan range to be empty and thus returns the kOutOfBound iteration result during Seek, the iteration result is not propagated up and Prepare() assumes end of file and aborts the remaining scans. This results in incorrect behavior and unpredictable multi scan results. Pull Request resolved: facebook#13960 Test Plan: Add unit test to table_test.cc Reviewed By: xingbowang Differential Revision: D82590892 Pulled By: anand1976 fbshipit-source-id: 8cfaaae2bb1a9509ddf8ec967cb8a8801748413d
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 PR fixes a bug in BlockBasedTableIterator::Prepare in conjunction with a user defined index (UDI). If the UDI determines a scan range to be empty and thus returns the kOutOfBound iteration result during Seek, the iteration result is not propagated up and Prepare() assumes end of file and aborts the remaining scans. This results in incorrect behavior and unpredictable multi scan results.
Test plan:
Add unit test to table_test.cc