Skip to content

Commit 0b67a96

Browse files
author
sanketh
committed
[#15885] Fix flaky test PgMiniTest.TabletSplitSecondaryIndexYSQL
Summary: The test expects the main table to split during the test. This doesn't always happen because the sst files generated are less than the force split threshold set in the test. Fixing it to 10K should cause it split more predictably. This gflag is only used for this one test, so it shouldn't affect other tests. Test Plan: Run the test a few times. ``` ./yb_build.sh release --cxx-test pg_mini-test --gtest_filter PgMiniTest.TabletSplitSecondaryIndexYSQL ``` Reviewers: asrivastava Reviewed By: asrivastava Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D40801
1 parent eff21a0 commit 0b67a96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/yb/yql/pgwrapper/pg_mini-test.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1732,7 +1732,7 @@ class PgMiniTabletSplitTest : public PgMiniTest {
17321732
ANNOTATE_UNPROTECTED_WRITE(FLAGS_tablet_split_high_phase_size_threshold_bytes) = 0;
17331733
ANNOTATE_UNPROTECTED_WRITE(FLAGS_tablet_split_low_phase_shard_count_per_node) = 0;
17341734
ANNOTATE_UNPROTECTED_WRITE(FLAGS_tablet_split_high_phase_shard_count_per_node) = 0;
1735-
ANNOTATE_UNPROTECTED_WRITE(FLAGS_tablet_force_split_threshold_bytes) = 30_KB;
1735+
ANNOTATE_UNPROTECTED_WRITE(FLAGS_tablet_force_split_threshold_bytes) = 10_KB;
17361736
ANNOTATE_UNPROTECTED_WRITE(FLAGS_db_write_buffer_size) =
17371737
FLAGS_tablet_force_split_threshold_bytes / 4;
17381738
ANNOTATE_UNPROTECTED_WRITE(FLAGS_db_block_size_bytes) = 2_KB;
@@ -1774,11 +1774,13 @@ void PgMiniTest::StartReadWriteThreads(const std::string table_name,
17741774
TestThreadHolder *thread_holder) {
17751775
// Writer thread that does parallel writes into table
17761776
thread_holder->AddThread([this, table_name] {
1777+
LOG(INFO) << "Starting writes to " << table_name;
17771778
auto conn = ASSERT_RESULT(Connect());
17781779
for (int i = 501; i < 2000; i++) {
17791780
ASSERT_OK(conn.ExecuteFormat("INSERT INTO $0 VALUES ($1, $2, $3, $4)",
17801781
table_name, i, i, i, 1));
17811782
}
1783+
LOG(INFO) << "Completed writes to " << table_name;
17821784
});
17831785

17841786
// Index read from the table

0 commit comments

Comments
 (0)