Repository navigation
Stable 25.8 Backport of #89127 - Fix TTL merge bug - #2774
Conversation
Fix TTL merge bug
CI triage for
|
| Check | Classification | PR-caused? |
|---|---|---|
| Stateless tests (amd_ubsan, parallel) | Known flaky crash in a ReplicatedMergeTree paranoid check | ❌ No |
| Stateless tests (amd_binary, old analyzer, s3 storage, DatabaseReplicated, sequential) | Infra: Docker image pull failed | ❌ No |
| DCO | Missing sign-off on the upstream merge commit | ❌ No (process only) |
1. Stateless tests (amd_ubsan, parallel): known flaky crash
The server aborted on a LOGICAL_ERROR, and every test still running was then reported as failed (03573_create_user_query_parameters_format: server died, plus Exception in test runner, Killed by signal, Fatal messages, Logical error thrown). Those are all side effects of the one crash:
<Fatal> : Logical error: 'Part all_82_82_0 from table test_1h68stqp.alter_table0 (...) remains in ZooKeeper after DROP_RANGE all_0_82_999999999_999999999'.
6. ./src/Storages/StorageReplicatedMergeTree.cpp:2713: DB::paranoidCheckForCoveredPartsInZooKeeper ...
- Why it's not this PR: the error comes from
StorageReplicatedMergeTree(paranoidCheckForCoveredPartsInZooKeeper) on analter_table0table from the parallel-alter tests. This PR only touches the TTL-merge selection path inStorageMergeTree.cpp, the non-replicated engine: atry/catchthat undoesbookMergeWithTTL()if creating the tagger throws. That code never runs for Replicated tables. - Known upstream: the same assertion on the same table name
alter_table0is reported in Failed assertionLogical error: 'Part all_107_107_0 from table test_n061whyr.alter_table0 (8a48855c-716c-49fa-9280-5ef12faa0dd4) remains in ZooKeeper after DROP_RANGE all_0_107_999999999_999999999'ClickHouse/ClickHouse#67317, along with LOGICAL_ERROR: Part {} remains in ZooKeeper after DROP_RANGE {} ClickHouse/ClickHouse#56037, Logical error: Part A from table B remains in ZooKeeper after DROP_RANGE C (STID: 4202-575d) ClickHouse/ClickHouse#92850 and Logical error: 'Part 1_3_3_0 remains in ZooKeeper after DROP_RANGE 1_0_29_999999999_999999999' ClickHouse/ClickHouse#56819. - Next step: safe to re-run.
2. Stateless tests (…, DatabaseReplicated, sequential): infra
The job never started any tests because pulling the test image failed:
docker: unknown: failed to copy: httpReadSeeker: failed open: unexpected status from GET request to https://registry-1.docker.io/v2/altinityinfra/stateless-test/blobs/sha256:050d288c…: 502 Bad Gateway
ERROR: Job killed, exit code [125]
- Next step: re-run the job.
3. DCO
The only commit is the upstream merge commit 34d6ae4684 (Merge pull request #89127 …), which has no Signed-off-by. This happens on every cherry-picked upstream backport: #2819, a stable-25.8 backport that was merged, failed DCO the same way. If your process needs DCO to be green, set it manually or override it as usual for backports. Don't rewrite the commit.
Diff sanity check: the backport matches upstream ClickHouse#89127: a 13+/3− change that keeps the TTL-merge counter balanced when CurrentlyMergingPartsTagger throws (for example, when there isn't enough disk space). Builds passed, and every other stateless, integration and regression suite on this SHA is green. After re-running the two stateless jobs, this should be ready to merge.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Prevent TTL merge counter leaks when exceptions occur during merge preparation. Resolves ClickHouse#89019 (ClickHouse#89127 by @save-my-heart)
Documentation entry for user-facing changes
...
CI/CD Options
Exclude tests:
Regression jobs to run: