Skip to content

Commit 2644245

Browse files
committed
[#28470] docdb: Add gflag for toggle on and off the colocated table tombstone cache optimization
Summary: Add gflag `FLAGS_enable_colocated_table_tombstone_cache` for toggle on and off the colocated table tombstone cache optimization Jira: DB-18155 Test Plan: Jenkins Reviewers: rthallam Reviewed By: rthallam Subscribers: ybase Differential Revision: https://phorge.dev.yugabyte.com/D46557
1 parent bdadd6b commit 2644245

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/yb/docdb/doc_rowwise_iterator.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ DECLARE_bool(use_fast_backward_scan);
5959

6060
DEPRECATE_FLAG(bool, use_offset_based_key_decoding, "02_2024");
6161

62+
DEFINE_RUNTIME_bool(enable_colocated_table_tombstone_cache, true,
63+
"When set, colocated reads will cache table tombstones to avoid repeated tombstone checks.");
64+
6265
using namespace std::chrono_literals;
6366

6467
namespace yb::docdb {
@@ -484,7 +487,8 @@ const dockv::SchemaPackingStorage& DocRowwiseIterator::schema_packing_storage()
484487
}
485488

486489
Result<DocHybridTime> DocRowwiseIterator::GetTableTombstoneTime(Slice root_doc_key) const {
487-
if (!doc_read_context_.schema().has_colocation_id()) {
490+
if (!doc_read_context_.schema().has_colocation_id() ||
491+
!GetAtomicFlag(&FLAGS_enable_colocated_table_tombstone_cache)) {
488492
return docdb::GetTableTombstoneTime(
489493
root_doc_key, doc_db_, txn_op_context_, read_operation_data_);
490494
}

0 commit comments

Comments
 (0)