Skip to content

Fix data part consistency checks for types with dynamic structure and detect corrupted columns_substreams.txt - #104888

Merged
Avogar merged 3 commits into
masterfrom
fix-json-check-and-corrupted-substreams
May 18, 2026
Merged

Avogar merged 3 commits into
masterfrom
fix-json-check-and-corrupted-substreams

Conversation

@Avogar

@Avogar Avogar commented May 13, 2026 •

Copy link
Copy Markdown
Member

Linked issues

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fix data part consistency checks for types with dynamic structure and detect corrupted columns_substreams.txt. Resubmit of #103858 with additional changes.

Version info

  • Merged into: 26.5.1.759
  • Backported to: 26.4.3.36, 26.3.11.31, 26.2.19.39

@clickhouse-gh

clickhouse-gh Bot commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [5b83b12]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) FAIL
01710_projection_additional_filters FAIL cidb IGNORED
01410_nullable_key_and_index NOT_FAILED cidb IGNORED

AI Review

Summary

This PR updates Wide-part consistency checks to use columns_substreams.txt as the source of truth for dynamic-structure columns, adds corruption detection/discard logic for invalid columns_substreams.txt prefixes, and introduces coverage for JSON Wide parts plus corrupted-substreams recovery. I reviewed the current diff and all prior discussion threads against head 139e75f61eadc40cd8e736919d78fabd6904792d; the previously raised concerns are either addressed in code or no longer actionable, and I did not find new unresolved contract violations.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label May 13, 2026

@Ergus Ergus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, but I have a couple of comments it would like to clarify.

@Avogar
Avogar requested a review from Ergus May 15, 2026 14:05
@clickhouse-gh

clickhouse-gh Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.10% +0.00%
Functions 90.90% 90.90% +0.00%
Branches 76.60% 76.60% +0.00%

Changed lines: 57.46% (104/181) | lost baseline coverage: 4 line(s) · Uncovered code

Full report · Diff report

@Ergus Ergus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just mention that the new corruption detector is still too permissive for dotted columns that share a prefix, so some bad columns_substreams.txt will survive validation and then be trusted as the source of truth.

Buy the fix seems not trivial to implement, so for now let's live with it.

@Avogar
Avogar added this pull request to the merge queue May 18, 2026
@Avogar Avogar added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label May 18, 2026
Merged via the queue into master with commit c44ce3f May 18, 2026
165 of 167 checks passed
@Avogar
Avogar deleted the fix-json-check-and-corrupted-substreams branch May 18, 2026 17:13
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label May 18, 2026
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 18, 2026
robot-ch-test-poll4 added a commit that referenced this pull request May 18, 2026
Cherry pick #104888 to 26.2: Fix data part consistency checks for types with dynamic structure and detect corrupted columns_substreams.txt
robot-clickhouse added a commit that referenced this pull request May 18, 2026
…with dynamic structure and detect corrupted columns_substreams.txt
robot-ch-test-poll4 added a commit that referenced this pull request May 18, 2026
Cherry pick #104888 to 26.3: Fix data part consistency checks for types with dynamic structure and detect corrupted columns_substreams.txt
robot-clickhouse added a commit that referenced this pull request May 18, 2026
…with dynamic structure and detect corrupted columns_substreams.txt
robot-ch-test-poll4 added a commit that referenced this pull request May 18, 2026
Cherry pick #104888 to 26.4: Fix data part consistency checks for types with dynamic structure and detect corrupted columns_substreams.txt
robot-clickhouse added a commit that referenced this pull request May 18, 2026
…with dynamic structure and detect corrupted columns_substreams.txt
Avogar added a commit that referenced this pull request May 19, 2026
Backport #104888 to 26.4: Fix data part consistency checks for types with dynamic structure and detect corrupted columns_substreams.txt
Avogar added a commit that referenced this pull request May 19, 2026
Backport #104888 to 26.3: Fix data part consistency checks for types with dynamic structure and detect corrupted columns_substreams.txt
Avogar added a commit that referenced this pull request May 19, 2026
Backport #104888 to 26.2: Fix data part consistency checks for types with dynamic structure and detect corrupted columns_substreams.txt
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label May 19, 2026
@watson-ch watson-ch Bot added v25.12-must-backport v26.2-must-backport v26.4-must-backport and removed pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR labels Jul 6, 2026
@watson-ch

watson-ch Bot commented Jul 6, 2026

Copy link
Copy Markdown

Backport labels have been automatically added based on https://github.com/ClickHouse/clickhouse-core-incidents/issues/1799

Labels added:

  • v25.12-must-backport
  • v26.2-must-backport
  • v26.4-must-backport

These labels ensure backport PRs are properly created for each affected release version. The release automation will create backport PRs as needed based on these labels.

@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jul 6, 2026
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Jul 6, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…for types with dynamic structure and detect corrupted columns_substreams.txt
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…4888

Backport ClickHouse#104888 to 26.4: Fix data part consistency checks for types with dynamic structure and detect corrupted columns_substreams.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v25.12-must-backport v26.2-must-backport v26.4-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants