Skip to content

Commit e8459c2

Browse files
rockeetdlenev
authored andcommitted
set m_read_opts.ignore_range_deletions properly (percona#1218)
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
1 parent 8db7cc7 commit e8459c2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

storage/rocksdb/ha_rocksdb.cc

+8-1
Original file line numberDiff line numberDiff line change
@@ -4030,7 +4030,10 @@ class Rdb_transaction {
40304030
}
40314031

40324032
explicit Rdb_transaction(THD *const thd)
4033-
: m_thd(thd), m_tbl_io_perf(nullptr) {}
4033+
: m_thd(thd), m_tbl_io_perf(nullptr) {
4034+
m_read_opts.ignore_range_deletions =
4035+
!rocksdb_enable_delete_range_for_drop_index;
4036+
}
40344037

40354038
virtual ~Rdb_transaction() {
40364039
#ifndef DEBUG_OFF
@@ -4397,6 +4400,8 @@ class Rdb_transaction_impl : public Rdb_transaction {
43974400
m_rocksdb_reuse_tx = nullptr;
43984401

43994402
m_read_opts = rocksdb::ReadOptions();
4403+
m_read_opts.ignore_range_deletions =
4404+
!rocksdb_enable_delete_range_for_drop_index;
44004405

44014406
set_initial_savepoint();
44024407

@@ -4508,6 +4513,8 @@ class Rdb_writebatch_impl : public Rdb_transaction {
45084513
void reset() {
45094514
m_batch->Clear();
45104515
m_read_opts = rocksdb::ReadOptions();
4516+
m_read_opts.ignore_range_deletions =
4517+
!rocksdb_enable_delete_range_for_drop_index;
45114518
m_ddl_transaction = false;
45124519
}
45134520

0 commit comments

Comments
 (0)