Skip to content

Commit

Permalink
set m_read_opts.ignore_range_deletions properly (percona#1218)
Browse files Browse the repository at this point in the history
Upstream commit ID: facebook/mysql-5.6@238afbb
PS-8494: Merge percona-202206 (https://jira.percona.com/browse/PS-8494)

Summary:
ignore_range_deletions should be set to true when range del is not enabled

Pull Request resolved: facebook/mysql-5.6#1218

Reviewed By: Pushapgl

Differential Revision: D39115879

Pulled By: yoshinorim

fbshipit-source-id: 40e7bcb86590c8f9be44dfa3f74277fb3f49a6d5
  • Loading branch information
rockeet authored and VarunNagaraju committed Jun 12, 2024
1 parent ff1eb5c commit 3e3dab8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion storage/rocksdb/ha_rocksdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4043,7 +4043,10 @@ class Rdb_transaction {
}

explicit Rdb_transaction(THD *const thd)
: m_thd(thd), m_tbl_io_perf(nullptr) {}
: m_thd(thd), m_tbl_io_perf(nullptr) {
m_read_opts.ignore_range_deletions =
!rocksdb_enable_delete_range_for_drop_index;
}

virtual ~Rdb_transaction() {
#ifndef DEBUG_OFF
Expand Down Expand Up @@ -4410,6 +4413,8 @@ class Rdb_transaction_impl : public Rdb_transaction {
m_rocksdb_reuse_tx = nullptr;

m_read_opts = rocksdb::ReadOptions();
m_read_opts.ignore_range_deletions =
!rocksdb_enable_delete_range_for_drop_index;

set_initial_savepoint();

Expand Down Expand Up @@ -4521,6 +4526,8 @@ class Rdb_writebatch_impl : public Rdb_transaction {
void reset() {
m_batch->Clear();
m_read_opts = rocksdb::ReadOptions();
m_read_opts.ignore_range_deletions =
!rocksdb_enable_delete_range_for_drop_index;
m_ddl_transaction = false;
}

Expand Down

0 comments on commit 3e3dab8

Please sign in to comment.