Fix flaky test 03706_statistics_preserve_checksums_on_mutations#100772
Conversation
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]>
Pre-PR Validation Gatea) Deterministic repro? Semi-deterministic — ~30% failure rate through the test runner with MergeTree randomization ( b) Root cause explained? When c) Fix matches root cause? Yes — pins d) Test intent preserved? Yes — the test still verifies that e) Both directions demonstrated? Yes:
Session: 828a9c69 |
|
Workflow [PR], commit [1906c0e] Summary: ❌
AI ReviewSummaryThis PR stabilizes ClickHouse Rules
Final Verdict
|
|
maybe this fix is correct |
3570969
|
This is a better fix - #100896 |
…atistics-checksums Fix flaky test 03706_statistics_preserve_checksums_on_mutations
Pin
serialization_info_version='basic'in the test's CREATE TABLE to fix~30% failure rate under CI's MergeTree setting randomization.
When
serialization_info_version=with_typesis randomized, the INSERT andmutation (ALTER TABLE REWRITE PARTS) code paths produce different
serialization.jsonmetadata content. The INSERT path constructsSerializationInfo from the data write, while the full-column mutation path
reads settings from
source_part->storage.getSettings()(MutateTask.cpp:642-653).This causes a mismatch in the serialization metadata format — the actual
column data is identical (verified:
uncompressed_hash_of_compressed_filesmatches in all failures).
Investigation: out of 30 test runs with MergeTree randomization, 9 failed.
All 9 failures (100%) had
serialization_info_version=with_types— probabilityof this being random is (0.5)^9 = 0.2%. With the pin to
basic, 50/50 passesunder full randomization (both query and MergeTree settings).
Closes #100786
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes