Repository navigation
Conversation
`IMergeTreeDataPart::metadata_version` was declared without an in-class initializer, so reading it via `getMetadataVersion` before `setColumns` returned an indeterminate value (UB). `ServersHashRing::nodes_num` was also declared without an initializer and not reset in the empty-set early-return branch of `rebuild`, so calling `size` before the first non-empty rebuild or after an empty rebuild returned a garbage or stale value. Both findings come from Issue ClickHouse#105843 (Linux Verification Center, SVACE static analysis); the patch matches the suggested fix exactly. Closes ClickHouse#105843
Pre-PR validation gateThis is an SVACE-driven hygiene fix, not a CI failure reproduction. Some items are N/A.
session: cron:clickhouse-ci-task-worker:20260530-114500 |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 4/4 (100.00%) | Lost baseline coverage (was covered on master, now uncovered in this PR): 1 line(s) · Uncovered code |
|
@groeneai, first we have to fix the problem "Server died" found by our CI. Please send a fix in a separate PR. |
|
This PR implements a tiny part of #100399 |
|
@alexey-milovidov investigated the 'Server died' on
This matches the chronic CI infrastructure pattern. CIDB 30-day: 77 'Server died' hits on this check name across 57 distinct PRs, 0 master hits. 2026-05-30 alone: 50 hits across 43 unrelated PRs — #106154 is one of 43 victims of the same staging-cluster overload window (other examples include #80263, #101796, #103706, #105019, #105375 — all unrelated codepaths). PR #106154's actual change is 3 lines ( Per the project rule about not making speculative code changes for failures that can't be backed by a reproducer or report (per Algunenano on #105675), I'm not filing a separate code-fix PR here. The actionable fix sits outside the ClickHouse repo (CIDB staging cluster merge throughput / runner stderr-volume heuristic). Request: retrigger CI on #106154, or rebase to a post-recovery commit. Happy to dig deeper if you have a specific hypothesis — coredump, repro path, or a code region you suspect. |
This might be a wrongly configured cluster or just bad infrastructure. Send another PR that will work around that by not making the CI check red if that staging cluster is not responding. |
|
@alexey-milovidov filed: #106176 — The classifier requires ≥100 |
|
Ok. Now it is totally redundant, and it shows that SVACE adds nothing compared to clang-tidy. |
SVACE static analysis flagged two primitive class members without in-class initializers, both reachable before any later assignment.
IMergeTreeDataPart::metadata_versionis read viagetMetadataVersionand normally set later insetColumns, so any access between construction andsetColumnsreads indeterminate memory.ServersHashRing::nodes_numis read viasizeand only assigned at the end of a non-emptyrebuild. The empty-set early-return branch leaves it unchanged, sosizereturns a garbage or stale value afterrebuildwith an empty set.The patch adds
= 0initializers in both declarations and resetsnodes_numbefore the early-return inrebuildto match the semantics of the cleared ring. Matches the suggestion in #105843 exactly.Closes #105843.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
N/A (SVACE hygiene fix; no user-visible behavior change).
Documentation entry for user-facing changes