Skip to content

Commit 685cd95

Browse files
committed
changefeedccl: explicitly set per-table PTS cluster setting in tests
Previously, the per-table protected timestamp cluster setting was only explicitly set to true in tests, which matched the default value. As a result, when tests attempted to disable the setting, it remained enabled, leading to unexpected behavior and assertion failures. This change ensures the cluster setting is always explicitly set to the value provided by the test, avoiding reliance on defaults and making test behavior consistent and predictable. Fixes: #153088 Epic: CRDB-1421 Release note: None
1 parent 3cf81a8 commit 685cd95

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg/cmd/roachtest/tests/cdc.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,10 +1819,8 @@ func runCDCMultiTablePTSBenchmark(
18191819
numRanges = params.numRanges
18201820
}
18211821

1822-
if params.perTablePTS {
1823-
if _, err := db.Exec("SET CLUSTER SETTING changefeed.protected_timestamp.per_table.enabled = true"); err != nil {
1824-
t.Fatalf("failed to set per-table protected timestamps: %v", err)
1825-
}
1822+
if _, err := db.Exec("SET CLUSTER SETTING changefeed.protected_timestamp.per_table.enabled = $1", params.perTablePTS); err != nil {
1823+
t.Fatalf("failed to set per-table protected timestamps: %v", err)
18261824
}
18271825

18281826
initCmd := fmt.Sprintf("./cockroach workload init bank --rows=%d --ranges=%d --tables=%d {pgurl%s}",

0 commit comments

Comments
 (0)