Repository navigation
Harden 02539_vertical_merge_compact_parts instead of skipping under SharedMergeTree - #110537
Conversation
The test verifies local vertical-merge mechanics (compact to wide parts)
by parsing MergeTree part names from `system.part_log` with
`splitByChar('_', part_name)[2]::UInt64`. With `SharedMergeTree`,
`part_log` for the table can contain extra entries whose `part_name` is a
filesystem path, so the cast throws `CANNOT_PARSE_TEXT`:
Cannot parse string 'work/clickhouse-private/clickhouse-private/ci/tmp/run' as UInt64
Observed in the "CH Inc sync" run of
#110430 in "Stateless tests
(amd_asan_ubsan, distributed cache, meta in keeper, s3 storage, parallel,
1/2)". The test is already listed as cloud-incompatible in the private
repo; this tag makes the shared-merge-tree stateless runs skip it too.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
Workflow [PR], commit [c3146da] Summary: ✅ AI ReviewSummaryThis PR hardens Final VerdictStatus: ✅ Approve |
Algunenano
left a comment
There was a problem hiding this comment.
This change doesn't make sense. SharedMergeTree is perfectly capable of using vertical merges. This is a regression on recent code, which BTW has been addressed by changing the test and not fixing the code, in private
…haredMergeTree
The `min_block`/`max_block` values derived via `splitByChar('_', part_name)`
and a hard `::UInt64` cast were computed in a `WITH` clause and referenced in
the `WHERE` filter, so they got evaluated for every `system.part_log` row of
the table before the `min_block = 1 AND max_block = ...` filter could narrow
them down. Under `SharedMergeTree`, `part_log` for this table can contain
extra rows whose `part_name` is a filesystem path, so the cast threw
`CANNOT_PARSE_TEXT` and failed the test.
Replace the hard cast with `toUInt64OrNull`, so malformed `part_name` values
parse to `NULL` and get filtered out by the `WHERE` clause instead of
throwing, keeping `SharedMergeTree` coverage instead of tagging the test out
via `no-shared-merge-tree` (per review feedback on this change).
Related: #110430
no-shared-merge-tree tag to 02539_vertical_merge_compact_parts|
@Algunenano, agreed — I dropped the The failure came from eagerly doing This matches the private resolution you mentioned (adjusting the test rather than the vertical-merge code) — the path-style |
Algunenano
left a comment
There was a problem hiding this comment.
Let's try to match the current status of private exactly instead. I've tried to suggest the change but I'm not sure it worked fine. It's easier to just checkout the file directly
|
@groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110537&sha=4154e251f265d6dc754ca35aee04a73dc4866c51&name_0=PR&name_1=Stateless%20tests%20%28amd_llvm_coverage%2C%20old%20analyzer%2C%20s3%20storage%2C%20DBReplicated%2C%20WasmEdge%2C%20parallel%2C%202%2F3%29 and provide a fix in a separate PR. If the fix is already in progress, link it here. All five failed tests in this shard are collateral from a single server death ( |
|
Confirmed: all five failures in this shard are collateral from a single server death ( CIDB for this shard/sha (
Root cause is the Fix is in progress, two open PRs:
|
|
The only red on This is the known |
…red-merge-tree Harden 02539_vertical_merge_compact_parts instead of skipping under SharedMergeTree
Related: #110430
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not for changelog.
Documentation entry for user-facing changes
The test verifies local vertical-merge mechanics (compact to wide parts) by parsing
MergeTreepart names fromsystem.part_logwithsplitByChar('_', part_name)[2]::UInt64. WithSharedMergeTree,part_logfor the table can contain extra entries whosepart_nameis a filesystem path, so the cast throwsCANNOT_PARSE_TEXT(Cannot parse string 'work/clickhouse-private/clickhouse-private/ci/tmp/run' as UInt64) and the test failed wheneverMergeTreewas replaced withSharedMergeTree.The initial version of this PR worked around the failure by adding a
no-shared-merge-treetag to skip the test entirely underSharedMergeTree. Per review feedback (SharedMergeTreeis perfectly capable of using vertical merges, so skipping the test removes real coverage), the query itself is hardened instead, matching the resolution already applied in the private repository exactly: the hard::UInt64casts are replaced withtoUInt64OrZero, so a malformedpart_nameparses to0and is filtered out by the existingWHERE min_block = 1 AND max_block = ...clause instead of throwing. The test keeps exercisingSharedMergeTree.Observed in the "CH Inc sync" run of #110430, job "Stateless tests (amd_asan_ubsan, distributed cache, meta in keeper, s3 storage, parallel, 1/2)".
Version info
26.7.1.1104(included in26.7and later)