Skip to content

Backport #101580 to 26.3: Fix flaky test 03706_statistics_preserve_checksums_on_mutations - #102946

Closed
groeneai wants to merge 1 commit into
ClickHouse:26.3from
groeneai:backport/26.3/101580
Closed

groeneai wants to merge 1 commit into
ClickHouse:26.3from
groeneai:backport/26.3/101580

Conversation

@groeneai

Copy link
Copy Markdown
Collaborator

Backport of PR #101580 to the 26.3 release branch.

Why

The test 03706_statistics_preserve_checksums_on_mutations is chronically flaky on the 26.3 release branch:

Root cause

The test-runner randomizes serialization_info_version. When with_types is picked, the INSERT and ALTER TABLE REWRITE PARTS code paths produce different serialization.json content (different type version metadata). This causes hash_of_all_files and hash_of_uncompressed_files mismatches. uncompressed_hash_of_compressed_files stays identical — actual data is fine, only the metadata differs between the two paths.

The fix pins serialization_info_version='basic' in the CREATE TABLE settings so both code paths produce identical metadata.

Change

Minimal 4-line addition to the CREATE TABLE settings. Backport scope is smaller than master's version of the test because map_serialization_version pins (from PR #100896) were never applied to 26.3.

Evidence on master

Before PR #101580 (April 8): ~1-3 master failures/day, 26 master failures in 14 days.
After PR #101580: 0 master failures in 17+ days. Pattern still active on 26.3.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

…reserve_checksums_on_mutations

Backport of PR ClickHouse#101580 to the 26.3 release branch.

Pins `serialization_info_version='basic'` in the test's `CREATE TABLE`
settings. The test is chronically flaky on 26.3 (25 direct-push failures
and 15 backport PR failures in the last 30 days) because CI randomizes
`serialization_info_version='with_types'`, which causes the `INSERT` and
`ALTER TABLE REWRITE PARTS` paths to produce different
`serialization.json` metadata content (different type version metadata),
resulting in `hash_of_all_files` and `hash_of_uncompressed_files`
checksum mismatches. The actual data is fine
(`uncompressed_hash_of_compressed_files` stays identical).

The equivalent pin has been in place on `master` since 2026-04-08 (PR
ClickHouse#101580 re-added it after PR ClickHouse#100896 mistakenly removed it). Since then
there have been zero master failures in 17+ days; all remaining failures
are on the 26.3 branch and backport PRs targeting 26.3.
@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @CurtizJ @alesapin — could you review this backport? It's a minimal 4-line pin of serialization_info_version='basic' in the test's CREATE TABLE settings, backporting the test-only portion of merged PR #101580 to fix a chronic flaky test on the 26.3 branch (25 direct-push failures + 15 backport PRs disrupted in 30 days; master has been clean 17+ days with this pin).

Session: cron:clickhouse-ci-task-worker:20260417-094500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants