Skip to content

Backport #116994 to 26.3: Do not recurse per empty block in the hadoop-snappy reader - #118078

Merged
alexey-milovidov merged 3 commits into
26.3from
backport/26.3/116994
Sep 5, 2026
Merged

alexey-milovidov merged 3 commits into
26.3from
backport/26.3/116994

Conversation

@robot-ch-test-poll4

@robot-ch-test-poll4 robot-ch-test-poll4 commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #116994

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.3.31.10

@robot-ch-test-poll4 robot-ch-test-poll4 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix labels Sep 4, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [ad71af4]

Summary: ✅

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=118078&sha=a9e98df792785bb9cf9ecdcf5e9a9021410a6dee&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan%2C%20distributed%20plan%2C%20parallel%2C%201%2F2%29 (04238_alter_rename_column_merge_race) and provide a fix in a separate PR. If the fix is already in progress, link it here. It looks like the RENAME COLUMN / OPTIMIZE ... FINAL race that #114913 fixes on 26.3; the test has been failing across many 26.3 PRs and on the branch itself since 2026-08.

The other red, 05049_hadoop_snappy_zero_length_blocks, was the backported test itself: 26.3 has no hadoop-snappy write buffer, so INTO OUTFILE ... COMPRESSION 'snappy' throws NOT_IMPLEMENTED. Fixed in 17a26d6 by building the fixture block with printf, and merged 26.3 in.

alexey-milovidov added a commit that referenced this pull request Sep 5, 2026
26.6 has no hadoop-snappy write buffer: `INTO OUTFILE ... COMPRESSION 'snappy'` throws
`Unsupported compression method` (`NOT_IMPLEMENTED`), which failed the backported test in
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=118080&sha=8294ff91a6354701a862a5c6aab4b271dfb84ab1&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20distributed%20plan%2C%20parallel%2C%202%2F2%29
(#118080). Write the single valid block with `printf` instead,
the same way the 26.3 backport (#118078) does.
@groeneai

groeneai commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Already in progress, and it is the PR you name: #114913 (base 26.3, open since 2026-08-15, not reviewed yet).

Confirmed on the sha you linked: the debuglog at a9e98df7 ends with count=0 from SELECT count() FROM t_rename_merge_race WHERE d1 != '' and FAIL on iteration 21: expected 10 non-empty rows, got 0, with no Timeout! and no LOGICAL_ERROR in that context. So it is the data-loss facet of the race, not the slow-test facet that also hits this file.

Why the branch still fails with the earlier backport present: #112623 backported #109356, which fixes the sibling facet in MergeTree/MergeTask.cpp and adds 04648_alter_rename_column_no_default_merge_race. It never touches StorageMergeTree.cpp, so the OPTIMIZE merge-selection read that 04238 exercises is still served from the cached metadata snapshot: at the 26.3 tip that line reads metadata_snapshot = getInMemoryMetadataPtr();, and #114913 changes it to getInMemoryMetadataPtr(/*bypass_metadata_cache=*/true) (+1/-1, nothing else).

Breadth re-measured today over 30 days, matching what you describe: 0 failures in 6866 executed runs on true master, versus 16 failures in 96 runs of Stateless tests (amd_asan, distributed plan, parallel, 1/2) on 26.3 itself, plus 17 more across 16 distinct backport/26.3/* PRs, 2026-08-06 to 2026-09-04.

04238 did pass on your new head ad71af4b at 01:50Z, but at roughly 1 failure in 6 runs that is expected; 26.3 backports keep inheriting it until #114913 lands.

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Thanks, confirmed: the StorageMergeTree.cpp metadata-snapshot read is the remaining facet, and #114913 is the fix to land on 26.3. This backport is green at ad71af4b, including 04238 on that run, and needs nothing further; if 04238 reds again on a re-run, it is that inherited race and not this change.

@alexey-milovidov
alexey-milovidov merged commit f30ecf6 into 26.3 Sep 5, 2026
34 checks passed
@alexey-milovidov
alexey-milovidov deleted the backport/26.3/116994 branch September 5, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants