Skip to content

Commit 1906c0e

Browse files
groeneaiclaude
andcommitted
Fix flaky test 03706_statistics_preserve_checksums_on_mutations
Pin serialization_info_version='basic' in the test's CREATE TABLE settings. With 'with_types', the INSERT and mutation code paths produce different serialization.json metadata content, causing checksum mismatches (~30% failure rate under CI randomization). The actual data remains identical — only the serialization metadata format differs between the two write paths. All 9 observed failures in 30 test runs correlated 100% with serialization_info_version=with_types being randomized. With the pin, 50/50 passes under full randomization (both query and MergeTree settings). Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 5a39631 commit 1906c0e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/queries/0_stateless/03706_statistics_preserve_checksums_on_mutations.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ create table mt (key Int, value String) engine=MergeTree() order by key settings
1414
min_bytes_for_wide_part=0,
1515
-- otherwise sparse info will be different, since for INSERTs the sparse ratio is calculated for the whole block, while for mutations for each granula (FIXME?)
1616
ratio_of_defaults_for_sparse_serialization=1,
17+
-- Pin serialization_info_version to 'basic': with 'with_types' the INSERT and mutation
18+
-- paths produce different serialization.json content (the mutation always uses the table's
19+
-- stored settings while the INSERT path may produce different serialization info metadata),
20+
-- causing checksum mismatches that are not actual data corruption.
21+
serialization_info_version='basic',
1722
-- This uncovers the bug
1823
auto_statistics_types='uniq,minmax,countmin,tdigest'
1924
;

0 commit comments

Comments
 (0)