Skip to content

Commit 52bf982

Browse files
committed
execbuilder: fix test flake in show_trace
We metamorphically change `kv.transaction.write_buffering.max_buffer_size` cluster setting in 1B - 4MiB range, and we happen to pick a small enough value, then one of the txns in `show_trace` test can disable write buffering, producing a different trace. This commit fixes the flake by ensuring a lower bound on the buffer size. Release note: None
1 parent d8fe916 commit 52bf982

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/sql/opt/exec/execbuilder/testdata/show_trace

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
statement ok
66
SET kv_transaction_buffered_writes_enabled = true
77

8+
# The buffer size can be changed metamoprhically, and if it happens to be too
9+
# small (around 1KiB), then some of the txns below might flush the buffer,
10+
# resulting in different KV requests. To ensure deterministic traces we always
11+
# update the buffer size to be large enough for txns in this file.
12+
statement ok
13+
SET CLUSTER SETTING kv.transaction.write_buffering.max_buffer_size = '2KiB';
14+
815
# Check SHOW KV TRACE FOR SESSION.
916

1017
let $trace_query

0 commit comments

Comments
 (0)