-
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
Transaction::GetIterator does not honor ReadOptions #2343
Comments
@graetzer Interesting. Would you be willing to contribute unit tests for this? |
@adamretter something like
|
Closing this via automation due to lack of activity. If you'd like this to be re-opened, please just comment here and we'll open it back up. |
I ran into this as well and produced this test script that shows the If this is valid and you can tell me where a corresponding unit test would go, I'd be happy to submit a PR to add (obviously failing) test. |
@miasantreble worked upper bound support in transactions this in our last TechDebt week. We hit some problems and we haven't yet had time to finish it. |
excellent. we can work around this for now, but it'd be lovely to have it over the longer term. |
I meet this issue too. |
I ran into this bug as well. @evanmcc's reproduction is valid. |
See #7214 |
…ions in Transaction (#11680) Summary: Fix #11607 Fix #11679 Fix #11606 Fix #2343 Add bounds checking to `WBWIIteratorImpl`, which will be reflected in `BaseDeltaIterator::delta_iterator_::Valid()`, just like `BaseDeltaIterator::base_iterator_::Valid()`. In this way, the two sub itertors become more aligned from `BaseDeltaIterator`'s perspective. Like `DBIter`, the added bounds checking caps in either bound when seeking and disvalidates the `WBWIIteratorImpl` iterator when the lower bound is past or the upper bound is reached. Pull Request resolved: #11680 Test Plan: - A simple test added to write_batch_with_index_test.cc to exercise the bounds checking in `WBWIIteratorImpl`. - A sophisticated test added to transaction_test.cc to assert that `Transaction` with different write policies honor bounds in `ReadOptions`. It should be so as long as the `BaseDeltaIterator` is correctly coordinating the two sub iterators to perform iterating and bounds checking. Reviewed By: ajkr Differential Revision: D48125229 Pulled By: cbi42 fbshipit-source-id: c9acea52595aed1471a63d7ca6ef15d2a2af1367
The
TransactionBaseImpl::GetIterator
does not honor theprefix_same_as_start
anditerate_upper_bound
options for keys written in the current transaction.The underlying
WBWIIteratorImpl
does not check these options. This means the iterator returns non-matching writes from the current transaction, which we did not expect to see based on the documentation.This should either be documented or fixed, otherwise it leads to some frustrating bugs.
The text was updated successfully, but these errors were encountered: