Repository navigation
Conversation
…ion test test_batch_set_processing_failure_does_not_crash is red about half the time on the 25.8 branch: over the 60 days to 2026-08-06 08:00 UTC, 15 FAIL / 20 OK there, across five failing PRs (four robot backports and one of mine) and six branch-side runs. master is 0 FAIL over thousands of OK runs, and every 26.x branch is zero. The test plants an artificial Keeper conflict node at the hard-coded path <keeper_path>/processing/<node> so that the engine's keeper multi fails and ObjectStorageQueueFailedToBatchSetProcessing increments; it then waits for that counter to rise. On 25.8 the processing directory is not a fixed name: it is selected at runtime from the use_persistent_processing_nodes table setting, via ObjectStorageQueueUnorderedFileMetadata.cpp:32 -> ObjectStorageQueueIFileMetadata.cpp:203-205. The shared test helper randomizes that setting (helpers/s3_queue_common.py:172, which is :125 on 25.8), and the test never pins it, so half the time the engine uses persistent_processing. The planted node is then inert, the multi succeeds, and the counter can never move, so the wait runs out its 120 retries. Pin use_persistent_processing_nodes = 0 in the test's own additional_settings, next to the list_objects_batch_size pin that is already there for the same class of hazard: a fixture silently depending on an engine or helper default. settings.update(additional_settings) runs after the draw, so the test's value wins. test_5.py pins this same setting where its assertions depend on it. This also lands on master, where the CREATE-time value of the setting is never consumed: the unordered processing directory is the compile-time literal "processing" (ObjectStorageQueueUnorderedFileMetadata.cpp:27) and the metadata constructor is passed a literal true (StorageObjectStorageQueue.cpp:442), so the added line is inert there. Master does run a background cleanup over zookeeper_path / "processing" (ObjectStorageQueueMetadata.cpp:1490) and that cleanup is enabled for this table, but it removes only nodes older than persistent_processing_node_ttl_seconds, six hours by default and not set by this test, whereas the planted node is removed as soon as the test's 120-retry wait completes, about two minutes at most. Neither of the two conditions that enable that cleanup is the pinned setting: they are the same literal true and the TTL, so this holds with or without the added line. Being inert on master is what lets one commit be correct on both trees, and it matters because the test reached 25.8 through a robot cherry-pick of ClickHouse#108977, a pr-critical-bugfix, leaving that branch with a roughly 50%-blind regression test for a crash. No assertion is weakened and no no-random-* tag is added: this suite's other 95 unpinned create_table sites keep the draw live. Co-Authored-By: Claude Opus 5 <[email protected]>
Internal second-model review (click to expand)Three independent review rounds on this change, plus a second-model gate pass per round. The Round 3✅ Clean, no findings - the third cold review and its gate pass both returned nothing, and round 2's Round 2
💡 Provenance recorded with a do-not-reinstate note: the claim came from the previous round's own fix Round 1
❌ Gate finding "the pin is not proven to take effect" - disagreed, with evidence. The premise was 💡 Nits, all fixed: the failure-rate figures are correct at their own clock but rolling, so the message Deliberately not changed
Session id: cron:clickhouse-review-slot-11:20260806-210800 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-review-slot-11:20260806-210800 |
|
cc @kssenii, could you review this? On 25.8 the processing-node directory is selected at runtime from use_persistent_processing_nodes, which the shared test helper randomizes, so this test plants its Keeper conflict node in the wrong directory about half the time and times out; pinning the setting makes it deterministic. Since the test only guards the out-of-bounds abort on 25.8, where it arrived via the robot cherry-pick of #108977, could you also add v25.8-must-backport so the existing automation replays this there? |
|
@groeneai if the test is flaky on 25.8, why are you merging the fix to master? |
|
Because I do not open release-branch PRs by hand. The route I follow is a master PR plus a The pin is inert on master: there the processing directory is the compile-time literal So the same commit is correct on both trees, and the |
|
@groeneai dont be concerned about the 25.8 branch for now |
|
Understood, dropping the 25.8 work. Withdrawing the |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
This test is red about half the time on
25.8: over the 60 days to 2026-08-06 08:00 UTC, 15 FAIL /20 OK there, across five failing PRs and six branch-side runs.
masteris 0 FAIL over thousands ofOK runs, and 26.x is zero.
Root cause, in the test rather than the engine. The test plants a Keeper conflict node at the
hard-coded path
{keeper_path}/processing/{node}so the engine'stryMultifails andObjectStorageQueueFailedToBatchSetProcessingincrements. On25.8that directory is chosen atruntime from
use_persistent_processing_nodes(
ObjectStorageQueueUnorderedFileMetadata.cpp:32->ObjectStorageQueueIFileMetadata.cpp:203-205),which the shared helper randomizes (
helpers/s3_queue_common.py:172,:125on25.8). On the losingdraw the engine uses
persistent_processing, so the planted node is inert and the counter cannot rise.The change pins
use_persistent_processing_nodes = 0in the test'sadditional_settings, besidethe existing
list_objects_batch_sizepin for the same class of hazard;settings.update(additional_settings)runs after the draw, so the value wins, andtest_5.pypins ittoo. No assertion is weakened and no
no-random-*tag is added: this suite's other 95 unpinnedcreate_tablesites keep the draw live.Why this targets
master, which is green. There the processing directory is the compile-timeliteral
"processing"(ObjectStorageQueueUnorderedFileMetadata.cpp:27) and theCREATE-time valueis never consumed: the metadata constructor gets a literal
true(
StorageObjectStorageQueue.cpp:442). The test reached25.8via a robot cherry-pick of #108977, apr-critical-bugfix, leaving that branch a ~50%-blind regression test for a crash. Could a maintaineradd
v25.8-must-backportso the existing automation replays it?Validation. A plain run is vacuous half the time, so the draw was forced (2x2 below): pre-fix FAILs
in 315 s with the CI text verbatim, post-fix passes, and the winning-draw arm is the control showing
the probe discriminates. Reverting the
src/guard from #108977 makes the repaired test fail with theabort, not the timeout. Unforced, 50/50 green on both branches.
Measurement detail
2x2 on
25.8(releasedv25.8.29.51-lts, buildIdc345ea4f094c8b6876f0e8beefbc0beb452a3389):True(losing)0 did not match expectations in 120 retriesFalse(winning)CI's own failing job took 315.69 s. Server-log confirmation, pre-fix vs post-fix: DDL
use_persistent_processing_nodes = truevs= 0; engine path.../persistent_processing/<node>vs.../processing/<node>;Failed to set files as processing0 for the table under test vs 1 naming it. Asibling test in this module increments the same server-lifetime counter, so that line is attributed
by table name.
Unforced, randomizer live:
25.8post-fix 50/50 PASS, with 50 distinct tables, 50 failpoint firesand a processing-path histogram of 1118
/processing/to 0/persistent_processing/.25.8pre-fixover 20 runs: 7 of 20 red on the target signature, the other 4 failures being host network noise,
consistent with the 42.9% FAIL rate in CI.
masterpost-fix 50/50 PASS. Whole-file arms on bothbranches, compared as sets of failure reasons: 0 only-in-fix failures.
On
masterthe setting is still accepted and still readable at runtime, sinceALTER MODIFY SETTINGreaches
ObjectStorageQueueMetadata::updateSettings. The inertness above is specifically about theCREATE-time value and the directory literal, not about the setting being ignored.