Skip to content

Commit

Permalink
[BACKPORT 2.23.1] CDC: Disable long retention flags
Browse files Browse the repository at this point in the history
Summary: Disable the flags `cdc_read_wal_segment_by_segment` and `store_min_start_ht_running_txns` as relevant fixes are not present in 2.23.1 branch.

Test Plan: Jenkins: rebase: 2.23.1

Reviewers: siddharth.shah, skumar

Reviewed By: siddharth.shah

Subscribers: ycdcxcluster

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D39812
  • Loading branch information
Sumukh-Phalgaonkar committed Nov 8, 2024
1 parent f171b12 commit 5abe286
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/yb/cdc/cdcsdk_producer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ DEFINE_NON_RUNTIME_int64(
"ConsistentStreamSafeTime for CDCSDK by resolving all committed intetns");

DEFINE_RUNTIME_bool(cdc_read_wal_segment_by_segment,
true,
false,
"When this flag is set to true, GetChanges will read the WAL segment by "
"segment. If valid records are found in the first segment, GetChanges will "
"return these records in response. If no valid records are found then next "
Expand Down
3 changes: 3 additions & 0 deletions src/yb/client/ql-transaction-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ DECLARE_uint64(TEST_inject_sleep_before_applying_intents_ms);
DECLARE_bool(TEST_skip_process_apply);
DECLARE_bool(TEST_skip_remove_intent);
DECLARE_uint64(log_segment_size_bytes);
DECLARE_bool(store_min_start_ht_running_txns);

namespace yb {
namespace client {
Expand Down Expand Up @@ -1864,6 +1865,7 @@ TEST_F_EX(
QLTransactionTest, LogSegmentRolloverWithSingleRunningTxn,
QLTransactionTestWithSegmentRollover) {
ANNOTATE_UNPROTECTED_WRITE(FLAGS_TEST_skip_process_apply) = true;
ANNOTATE_UNPROTECTED_WRITE(FLAGS_store_min_start_ht_running_txns) = true;

auto& table_name = table_->name();

Expand Down Expand Up @@ -1896,6 +1898,7 @@ TEST_F_EX(

TEST_F_EX(
QLTransactionTest, LogSegmentRolloverWithMultipleTxns, QLTransactionTestWithSegmentRollover) {
ANNOTATE_UNPROTECTED_WRITE(FLAGS_store_min_start_ht_running_txns) = true;
auto table_name = table_->name();
int num_txns = 10;
for (int i = 0; i != num_txns; i++) {
Expand Down
2 changes: 2 additions & 0 deletions src/yb/consensus/log-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ DECLARE_bool(TEST_simulate_abrupt_server_restart);
DECLARE_bool(TEST_skip_file_close);
DECLARE_int64(reuse_unclosed_segment_threshold_bytes);
DECLARE_int32(min_segment_size_bytes_to_rollover_at_flush);
DECLARE_bool(store_min_start_ht_running_txns);

namespace yb {
namespace log {
Expand Down Expand Up @@ -653,6 +654,7 @@ void VerifyMinStartTimeRunningTxnsAfterCopy(
// Tests that segments roll over when max segment size is reached
// and that the player plays all entries in the correct order.
TEST_F(LogTest, TestSegmentRollover) {
ANNOTATE_UNPROTECTED_WRITE(FLAGS_store_min_start_ht_running_txns) = true;
BuildLog();
// Set a small segment size so that we have roll overs.
log_->SetMaxSegmentSizeForTests(990);
Expand Down
6 changes: 3 additions & 3 deletions src/yb/consensus/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@ DEFINE_RUNTIME_bool(enable_xcluster_timed_based_wal_retention, true,
"If true, enable time-based WAL retention for tables with xCluster "
"by using --cdc_wal_retention_time_secs.");

DEFINE_RUNTIME_AUTO_bool(store_min_start_ht_running_txns, kLocalPersisted, false, true,
"If enabled, minimum start hybrid time among running txns will be "
"persisted in the segment footer during closing of the segment.");
DEFINE_RUNTIME_bool(store_min_start_ht_running_txns, false,
"If enabled, minimum start hybrid time among running txns will be "
"persisted in the segment footer during closing of the segment.");

static std::string kSegmentPlaceholderFilePrefix = ".tmp.newsegment";
static std::string kSegmentPlaceholderFileTemplate = kSegmentPlaceholderFilePrefix + "XXXXXX";
Expand Down
2 changes: 2 additions & 0 deletions src/yb/tablet/tablet_peer-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ DECLARE_bool(quick_leader_election_on_create);
DECLARE_bool(TEST_pause_before_copying_bootstrap_state);
DECLARE_bool(TEST_pause_before_flushing_bootstrap_state);
DECLARE_bool(TEST_pause_before_submitting_flush_bootstrap_state);
DECLARE_bool(store_min_start_ht_running_txns);

namespace yb {
namespace tablet {
Expand Down Expand Up @@ -576,6 +577,7 @@ void VerifyNonDecreasingTxnStartTimeInClosedSegments(const log::SegmentSequence&
}

TEST_F(TabletPeerTest, TestMinStartTimeRunningTxnsOnLogSegmentRollover) {
ANNOTATE_UNPROTECTED_WRITE(FLAGS_store_min_start_ht_running_txns) = true;
google::SetVLOGLevel("tablet_peer-test*", 1);
ConsensusBootstrapInfo info;
ASSERT_OK(StartPeer(info));
Expand Down

0 comments on commit 5abe286

Please sign in to comment.