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

deleted record is returned during iterating in WBWI with upper bounds #11606

Closed
luqun opened this issue Jul 12, 2023 · 1 comment
Closed

deleted record is returned during iterating in WBWI with upper bounds #11606

luqun opened this issue Jul 12, 2023 · 1 comment
Assignees
Labels
bug Confirmed RocksDB bugs

Comments

@luqun
Copy link

luqun commented Jul 12, 2023

Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev

When iterate_upper_bound is specified and data are stored in Write Batch with index. In BaseDeltaIterator::UpdateCurrent(), It compares current retrieved key with iterate_upper_bound_ and find out the retrieved key is out of range, then it just return --- but at this time, the deltaiterator is still valid. see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L307

Expected behavior

These deleted KV pair shouldn't return during iterating in WBWI with upper bounds

Actual behavior

The Deleted KV pair returned during iterating in WBWI with upper bounds

Steps to reproduce the behavior

adding following test into utilities/transactions/transaction_test.cc, compile and run

TEST_P(TransactionTest, UpperBoundTest) {
// This test does writes without snapshot validation, and then tries to create
// iterator later, which is unsupported in write unprepared.
if (txn_db_options.write_policy == WRITE_UNPREPARED) {
return;
}

WriteOptions write_options;
ReadOptions read_options, snapshot_read_options;
Status s;

Transaction* txn = db->BeginTransaction(write_options);
ASSERT_TRUE(txn);

// Write some keys in a txn
s = txn->Put("2", "2");
ASSERT_OK(s);

s = txn->Put("1", "1");
ASSERT_OK(s);

s = txn->Delete("2");
ASSERT_OK(s);

read_options.iterate_upper_bound = new Slice("2", 1);
Iterator* iter = txn->GetIterator(read_options);
ASSERT_OK(iter->status());
iter->SeekToFirst();
while(iter->Valid())
{
  ASSERT_EQ("1", iter->key().ToString());
  iter->Next();
}
delete iter;
delete txn;

}

@luqun luqun changed the title deleted record is returned during WBWI with upper bounds deleted record is returned during iterating in WBWI with upper bounds Jul 12, 2023
facebook-github-bot pushed a commit to facebook/mysql-5.6 that referenced this issue Jul 14, 2023
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
@jowlyzhang jowlyzhang added the bug Confirmed RocksDB bugs label Jul 19, 2023
@cz2h
Copy link
Contributor

cz2h commented Jul 28, 2023

It looks like the delta_iterator_ never sets its status to false as what base_iterator_ is doing. I'd like to work on this issue.

@ajkr ajkr assigned cz2h Aug 2, 2023
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this issue Oct 3, 2023
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this issue Oct 18, 2023
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478
ajkr pushed a commit that referenced this issue Oct 20, 2023
…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
inikep pushed a commit to inikep/percona-server that referenced this issue Dec 20, 2023
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/percona-server that referenced this issue Dec 20, 2023
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/percona-server that referenced this issue Dec 21, 2023
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/percona-server that referenced this issue Jan 15, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to percona/percona-server that referenced this issue Jan 17, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/percona-server that referenced this issue Jan 17, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/percona-server that referenced this issue Jan 17, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/percona-server that referenced this issue Feb 8, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this issue Feb 9, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this issue Feb 9, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this issue Feb 12, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this issue Apr 12, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this issue Apr 12, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this issue Apr 12, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this issue Apr 15, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this issue Apr 15, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this issue Apr 15, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this issue Apr 15, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
VarunNagaraju pushed a commit to VarunNagaraju/percona-server that referenced this issue May 31, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
VarunNagaraju pushed a commit to VarunNagaraju/percona-server that referenced this issue Jun 5, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
VarunNagaraju pushed a commit to VarunNagaraju/percona-server that referenced this issue Jun 10, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
VarunNagaraju pushed a commit to VarunNagaraju/percona-server that referenced this issue Jun 12, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
VarunNagaraju pushed a commit to VarunNagaraju/percona-server that referenced this issue Jun 12, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jul 16, 2024
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jul 16, 2024
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jul 17, 2024
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jul 19, 2024
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jul 19, 2024
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478
dlenev pushed a commit to dlenev/percona-server that referenced this issue Jul 25, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jul 30, 2024
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478
dlenev pushed a commit to dlenev/percona-server that referenced this issue Jul 30, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jul 31, 2024
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 2, 2024
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 6, 2024
Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478
dlenev pushed a commit to dlenev/percona-server that referenced this issue Aug 21, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
dlenev pushed a commit to dlenev/percona-server that referenced this issue Aug 28, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
dlenev pushed a commit to dlenev/percona-server that referenced this issue Aug 30, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to percona/percona-server that referenced this issue Sep 23, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to percona/percona-server that referenced this issue Sep 25, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/percona-server that referenced this issue Sep 25, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
dlenev pushed a commit to dlenev/percona-server that referenced this issue Oct 17, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
dlenev pushed a commit to dlenev/percona-server that referenced this issue Oct 17, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
dlenev pushed a commit to dlenev/percona-server that referenced this issue Oct 22, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/percona-server that referenced this issue Oct 28, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to percona/percona-server that referenced this issue Oct 30, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/percona-server that referenced this issue Nov 11, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/percona-server that referenced this issue Nov 14, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
inikep pushed a commit to inikep/percona-server that referenced this issue Nov 14, 2024
Upstream commit ID: facebook/mysql-5.6@0bfdb05
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
rocksdb use Writebatchwithindex(WBWI) to support read your own data. But there are two issues for implementations:
1.  facebook/rocksdb#11606: Rocksdb may return deleted row or out of range row during iterating WBWI, see code https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L311, when it return due out of range(bound), its DeltaIterator may still valid but point to out of range row.
2. facebook/rocksdb#11607: it doesn't check lower_bound_ even  lower_bound_ values is passed to rocksdb with readoptions. see https://github.com/facebook/rocksdb/blob/main/utilities/write_batch_with_index/write_batch_with_index_internal.cc#L306

To workaround these issue,  add a variable rocksdb_check_iterate_bounds to control whether we should check iterate bounds and check these bounds inside myrocks if rocksdb_check_iterate_bounds is true.

Differential Revision: D46908478

fbshipit-source-id: 765f562928a3ad117d23a177b1b2d9e551b0c0ae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed RocksDB bugs
Projects
None yet
3 participants