Repository navigation
Retry tests on the "Coordination error:" rendering of transient Keeper errors - #107042
Conversation
Pre-PR validation gate
Session id: cron:clickhouse-worker-slot-0:20260610-164600 |
|
cc @maxknv @leshikus for a review — small one-line addition to |
|
Workflow [PR], commit [46e0289] Summary: ✅ AI ReviewSummaryThis PR widens Final Verdict✅ Approved LLVM Coverage ReportMeasured on commit 46e0289.
Changed lines: Uncovered code analysis did not run: No coverable C/C++ source files changed (contrib/ is excluded from coverage). Newly covered: +859 lines in 209 files (-1025 lines lost coverage) · Details |
|
CI fully finished on This PR only adds two transient-Keeper-error renderings ( Session id: cron:our-pr-ci-monitor:20260610-225430 |
|
Added a regression test (
Verified both directions against the real runner: with only the original two substrings, the generic-form assertion FAILS (all 3 generic renderings return The push also re-runs CI on a current base; the earlier red on |
…r errors
The functional test runner retries a test when its output matches an entry in
MESSAGES_TO_RETRY. The two Keeper entries added previously only match the
socket-layer rendering "Coordination::Exception: Session expired" /
"Coordination::Exception: Connection loss".
Generic Keeper operations (exists/get/getChildren) throw via the
Coordination::Exception(code) / fromPath(code, path) constructors, which format
the message as "Coordination error: {}", so the client prints
"Coordination::Exception: Coordination error: Session expired, path ...". That
string is not a substring of the existing retry entries, so the runner never
retried it and the test failed instead.
This is exactly the OPTIMIZE wait path in StorageReplicatedMergeTree
(tryWaitForReplicaToProcessLogEntry -> getZooKeeper()->exists(.../is_active)),
which surfaced as a flaky failure of 03100_lwu_29_concurrent_merges on amd_tsan
(Code: 999. Coordination::Exception: Coordination error: Session expired, path
/zookeeper/.../replicas/1/is_active. (KEEPER_EXCEPTION) during OPTIMIZE TABLE).
Add the "Coordination error: ..." variants so both renderings are retried. The
existing entries are kept so the socket-layer rendering stays covered.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Loads the real tests/clickhouse-test runner and asserts need_retry()
returns True for both the socket-layer ("Coordination::Exception: <msg>")
and the generic operation-level ("Coordination error: <msg>") renderings
of transient Keeper errors, and False for an unrelated error. Guards the
two-format match so the single-format gap cannot silently reappear.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
a1e0e97 to
2be2c3f
Compare
CI finish ledger - 2be2c3fCI is fully finished on this head and there is nothing to own: 0 failures, 177 checks completed, This supersedes the earlier ledger on Session id: cron:our-pr-ci-monitor:20260828-010000 |
The private sync PR was closed on 2026-08-25 while this pull request was still open, and GitHub refuses to reopen it, so `CH Inc sync` was stuck at `awaiting` with no sync branch and no private CI. The stale branch is deleted; this commit gives the synchronizer a fresh update to recreate the sync pull request from.
CI finish ledger - 021bcc6Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
The only red at this head, and not caused by this PR: the whole diff here is Owner attribution, since the STID alone does not settle it: that bucket pools more than one defect, Session id: cron:our-pr-ci-monitor:20260831-120000 |
…ouse-test-keeper-retry-match
The AI review asked for CI-executed coverage of the new `Coordination error:` entries in `MESSAGES_TO_RETRY` after the earlier `ci/tests` unit test was removed together with that directory. A stateless shell test now loads `tests/clickhouse-test` as a module and feeds both renderings of transient Keeper errors through `need_retry`, plus unrelated output that must not be retried. The test fails against the runner on master and passes with this branch.
CI finish ledger - 80be8adEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
On the second row, Session id: cron:our-pr-ci-monitor:20260902-200000 |
…ouse-test-keeper-retry-match
Master already carries fourteen `05059_*` tests; move the new one to the next free prefix.
CI finish ledger - 0f2b8c2Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task whose fixing-PR link will be posted here when it opens. Only
Not caused by this PR. Its only runner change adds two strings to
Session id: cron:our-pr-ci-monitor:20260906-163035 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
The functional test runner (
tests/clickhouse-test) retries a test when its output matches an entry inMESSAGES_TO_RETRY. The two transient-Keeper entries only match the socket-layer renderingCoordination::Exception: Session expired/Coordination::Exception: Connection loss.Generic Keeper operations (
exists/get/getChildren) throw via theCoordination::Exception(code)/fromPath(code, path)constructors, which format the message as"Coordination error: {}". The client then prints:That string is not a substring of the existing retry entries, so the runner never retried it and the test failed instead.
This is the OPTIMIZE wait path in
StorageReplicatedMergeTree(tryWaitForReplicaToProcessLogEntry->getZooKeeper()->exists(.../is_active)), which surfaced as a flaky failure of03100_lwu_29_concurrent_mergeson amd_tsan duringOPTIMIZE TABLE(reported on #80416). The sameCoordination error:rendering also hittest_drop_database_replicaandtest_distributed_ddl_parallel.Fix: add the
Coordination error: ...variants so both renderings are retried. The existing entries are kept so the socket-layer rendering stays covered. No test reference file contains these strings, so there is no false-positive risk.Regression coverage:
tests/queries/0_stateless/05059_clickhouse_test_keeper_retry_matching.shloadstests/clickhouse-testas a module and checksneed_retryon both renderings ofSession expired/Connection lossand on output that must not be retried, so every functional-test job executes it.Workflow [PR]
Sync PR [sync-upstream/pr/107042]
Version info
26.9.1.905(included in26.9and later)