Skip to content

Stop test_refreshable_mv_no_multi_read from clamping its Keeper sessions to 10 s - #112508

Merged
alexey-milovidov merged 3 commits into
ClickHouse:masterfrom
groeneai:fix-integration-harness-keeper-retry
Jul 31, 2026
Merged

alexey-milovidov merged 3 commits into
ClickHouse:masterfrom
groeneai:fix-integration-harness-keeper-retry

Conversation

@groeneai

@groeneai groeneai commented Jul 30, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #107042

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

Cleanup DDL in test_refreshable_mv_no_multi_read fails with a raw Code: 999. Coordination error: Connection loss, path /clickhouse/rdbN/max_log_ptr on Integration tests (amd_tsan, 4/6): 6 rows over 4 tests and 4 unrelated PRs plus a master hit, all on 2026-07-29. In ..._missing_flags_shutdown_clears_running_lock that statement is the load-bearing DETACH TABLE ... PERMANENTLY SYNC, so the run aborts before the assertions and the coverage is silently lost.

Root cause: the suite pinned the server's maximum session timeout to the same value as its minimum, clamping every session to 10 s. session_timeout_ms is read as max_session_timeout while min_session_timeout defaults to 10000 (KeeperTCPHandler.cpp:253-254); the <zookeeper> blocks set no client timeout, so the client requests 30000 and negotiation yields min(max(30000, 10000), 10000) (:436-439). This node's Keeper is embedded in the same process and the file restarts it 13 times, so on a loaded TSAN host a quiet period past 10 s drops the session mid-DDL.

Raising that cap to 30000 in all three keeper configs makes sessions negotiate the client default instead, buying stall tolerance of 10 s to 30 s. It is not extra heartbeats: the interval is session_timeout_ms / 3, so the budget is 3 either way. No existing assertion or failpoint changes. Only 9 of the 235 coordination_settings blocks under tests/integration that set it share this shape; elsewhere a co-located client mirrors the cap.

The invariant is pinned in-tree rather than measured by hand: after each config swap the suite reads the server-side cons four-letter command and asserts the negotiated timeout is 30000, once per edited config file. Reverting any single config to 10000 fails that assertion with the observed value, so a partial fix or a future re-lowering is caught by CI. The module passes 9/9.

Tracked separately: DatabaseReplicatedDDLWorker::enqueueQuery discards its ZooKeeperRetriesInfo (DatabaseReplicatedWorker.cpp:337-341) where the base honours it.

Master run: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=e0e5e04a027ed740ab3756d4853fb6d21126c077&name_0=MasterCI&name_1=Integration%20tests%20%28amd_tsan%2C%204%2F6%29

Version info

  • Merged into: 26.8.1.481 (included in 26.8 and later)

groeneai and others added 3 commits July 29, 2026 21:36
…ons to 10 s

Cleanup DDL in this suite fails with a raw
"Code: 999. Coordination error: Connection loss, path /clickhouse/rdbN/max_log_ptr"
on Integration tests (amd_tsan, 4/6): 6 rows over 4 tests and 4 unrelated PRs
plus a master hit, all on 2026-07-29. In
test_refreshable_mv_missing_flags_shutdown_clears_running_lock the failing
statement is the load-bearing DETACH TABLE ... PERMANENTLY SYNC, so the run
aborts before that test's three Keeper assertions execute and the regression
coverage is silently lost.

The suite pinned the server's maximum session timeout to the same value as its
minimum, which clamps every session to 10 s.
keeper_server.coordination_settings.session_timeout_ms is read as
max_session_timeout while min_session_timeout defaults to
DEFAULT_MIN_SESSION_TIMEOUT_MS = 10000 (KeeperTCPHandler.cpp:253-254). The
<zookeeper> blocks set no client timeout, so the client requests
DEFAULT_SESSION_TIMEOUT_MS = 30000 and the negotiation computes
min(max(30000, 10000), 10000) = 10000 (KeeperTCPHandler.cpp:436-439); with
max == min the clamp is unconditional. This node's Keeper is embedded in the
same process and the file restarts it 13 times, so on a loaded TSAN host a
quiet period past 10 s finalizes the session mid-DDL.

Raise that cap to 30000 in all three keeper configs so sessions negotiate the
same 30 s every other integration test gets. What this buys is wall-clock stall
tolerance, 10 s to 30 s. It is not extra heartbeats: the heartbeat interval is
session_timeout_ms / 3 (ZooKeeperImpl.cpp:876) and the idle deadline is the full
session_timeout_ms (:1050), so the missed-heartbeat budget is invariantly 3 at
any value.

Validated by measuring the negotiated timeout two independent ways on each of
the three configs. The server-side cons four-letter command, whose to= field is
KeeperTCPHandler::session_timeout (:924), reports to=10000 before and to=30000
after; the client heartbeat cadence in the server log goes 3.333 s to 10.0 s.
Reverting one config alone returns only that config to 10000, so each file is
load-bearing. The suite passes 9/9. The timing race itself is not reproducible
locally, so this removes a self-inflicted 10-second window rather than
guaranteeing a Keeper session can never drop.

Note that system.zookeeper_connection.session_timeout_ms cannot be used to
observe this: it returns the zkutil::ZooKeeper wrapper's args copy
(ZooKeeper.h:732), while receiveHandshake overwrites only the
Coordination::ZooKeeper impl's separate copy (ZooKeeperImpl.h:265), so it
reports the client's request and is blind to the clamp.

No test logic changes and no test in this suite expires a session on purpose,
so the extra headroom cannot alter what any of them measures.
The previous commit raised the server's max session-timeout cap from 10000 to
30000 in the suite's three Keeper configs, because the cap was equal to the
server's default minimum and therefore clamped every client session to 10 s
unconditionally. Nothing in the suite read that negotiated value, though: every
test asserts refresh-view behaviour, so reverting any single config back to
10000 left all nine tests green and the invariant rested on a by-hand
measurement instead of on CI.

Add a read-only helper that queries the server-side `cons` four-letter command
after each config swap and asserts every established session reports
to=30000, called once per edited config file. `cons` is in the default
four-letter allow list, so no config change is needed, and asserting its `to=`
field follows test_keeper_four_word_command.

The command answers on its own connection as well, and that connection never
completed a handshake: its session id is still the -1 initializer, which passes
the `session_id != 0` guard in dumpStats while `session_timeout` was never
assigned for it, so it reports to=0. Filter it out and assert the list of real
sessions is non-empty, otherwise an all-filtered parse would pass silently.

Verified per config file: reverting exactly one config to 10000 fails only this
new assertion, reporting the observed 10000, while the pre-existing assertions
in the same test still pass. The whole module passes 9/9 and the three calls
cost about 6 ms in total.

Co-Authored-By: Claude Fable 5 <[email protected]>
…timeout

The negotiated-timeout guard added in the previous round read `cons` exactly once and
treated an empty session list as a hard failure. At the first call site the node has no
Replicated database yet, so the only creator of the server's own Keeper session is
DDLWorker startup, which is scheduled as an AsyncLoader job that nothing waits for
(Context::setDDLWorker) - `restart_clickhouse()` returns as soon as a query answers, which
does not imply the session exists. The two later call sites are unaffected because
DatabaseReplicated::beforeLoadingMetadata connects synchronously in the non-async prologue
of TablesLoader::loadTablesAsync, long before the server accepts connections.

Only the session's existence is polled (30 s budget, 0.5 s interval). The timeout value
itself is never retried, so a clamped session still fails on the first read with the
observed value, and each of the three config edits stays separately load-bearing.

Co-Authored-By: Claude Fable 5 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model across three rounds (engine: codex; 2 findings
raised, 0 open). Two rounds bounced this change back for rework before it was published.

# Sev Finding Verdict Evidence / action
1 ❌ The fix's own invariant is unpinned: the change touched only the three keeper configs, but use_keeper_config merely copies a file and no test read the value the handshake produces, so reverting any single config to 10000 left the suite green AGREE, fixed Added a read-only helper asserting the negotiated timeout once per edited config file, from the server-side cons four-letter command. Three arms then each reverted exactly one config and each failed only on the new assertion carrying the observed value (30000, [10000], ...), at test.py:89, :115 and :199 respectively, so all three edits are independently load-bearing
2 ❌ At the first call site the assertion reads a session created asynchronously relative to restart_clickhouse() returning, so it is not deterministic on a loaded host AGREE, fixed With no Replicated database on disk yet the only creator is DDLWorker startup, an AsyncLoader job that is scheduled and never waited (Context::setDDLWorker; waitLoad appears 0 times in programs/server/Server.cpp), while the harness returns as soon as a trivial query answers. Fixed with a bounded existence-poll inside the helper; the timeout value is still asserted once, outside the loop
3 ⚠️ This PR's own description claimed "9 of 226 coordination_settings occurrences" share the vulnerable shape AGREE, fixed The 9 reproduces; the denominator did not, at the merge base, at head or on master, where there are 241 <coordination_settings> blocks and 235 that set session_timeout_ms. Corrected to 235

Severity: ❌ blocker / ⚠️ major / 💡 nit. Findings on hunks unchanged by a fix round are
auto-dropped.

Notes on the two blockers

A mechanical trap was worth catching for finding 1: cons answers on its own connection, which
never completed a handshake. Its session_id is the -1 initializer, which still passes the
session_id != 0 guard in dumpStats, and session_timeout is never assigned for it, so it prints
sid=0xffffffffffffffff with to=0. Unfiltered, the check reads [0, 30000] and fails on every
healthy run.

For finding 2, sites 2 and 3 are not affected: a Replicated database already exists at those
restarts, and DatabaseReplicated::beforeLoadingMetadata connects synchronously in the non-async
prologue of TablesLoader::loadTablesAsync. Six quiet-host runs had never missed the session, but
absence of a flake is not determinism for a provably asynchronous mechanism, and the failures this
PR fixes cluster on amd_tsan 4/6 where startup ordering stretches.

The poll deliberately polls only the session's existence, so a clamped session still fails on the
first read instead of degrading into a 30 s timeout. That was verified in both directions against
the shipped helper: a session appearing on the 4th read is picked up in 4 reads / 1.5 s, a session
already present costs 1 read, a clamped value fails on read 1 in 0.00 s, and an empty list
terminates on the budget with the original message. Three mutations each break exactly one of those
directions, including one that retries the value too and turns the clamped case from 0.00 s into
30 s.

Checked and deliberately unchanged

  • Blast radius. keeper_server.coordination_settings.session_timeout_ms has exactly one
    server-side reader, so raising it cannot perturb Raft timing: heartbeat interval, election
    timeouts and leadership expiry all come from their own settings, pinned to 0 here and untouched.
  • Why the sibling suites are unaffected. Elsewhere a co-located client mirrors the cap from
    coordination_settings, so the negotiation is not lop-sided. test_drop_is_lock_free already
    uses 30000, which is in-tree precedent for the resulting shape.
  • Sessions only gain headroom. No test in the file expires a session on purpose, asserts on
    expiry, or sleeps across a session lifetime (longest sleep 3 s). The added comment points a future
    author who wants a short session at the client-side setting instead, which is what the
    neighbouring test_refreshable_mv_keeper_loss suite does.
  • The load-bearing DETACH TABLE ... PERMANENTLY SYNC is untouched. That statement is the
    mechanism under test in the shutdown case and is also where the failure lands, which is why the
    coverage is currently lost silently rather than reported.
  • Not a band-aid. No retry wrapper, no widened bound, no reduced dataset, no no-parallel tag,
    no weakened assertion. A test-level retry was rejected because the available helper retries bare
    exceptions and would swallow the assertions these tests exist to make; lowering
    min_session_timeout_ms was rejected because it keeps the ceiling; a client-side-only timeout was
    rejected because it leaves a misleading server cap in place.
  • A related product gap is tracked separately, not bundled here:
    DatabaseReplicatedDDLWorker::enqueueQuery discards its ZooKeeperRetriesInfo where the base
    class honours it.

Reported honestly

The Connection loss race itself does not reproduce locally and no attempt is made to claim
otherwise; what is proven deterministically is the clamp that causes it. Integration tests are not
subject to functional-style settings randomization, so repeated whole-module runs were used instead
of a 50x run. Several of those runs hit container deaths from cross-slot interference on the shared
test host; they are reported as void rather than as results, and were attributed away from this
change by two independent facts: the affected tests do not call the added helper at all, and the
same selection passes on the unmodified tree once the host is quiet. The final module run is 9/9
with zero Connection loss and zero container deaths.

Session id: cron:clickhouse-review-slot-48:20260730-013900

@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (a-i)
# Gate Answer
a Deterministic repro? Yes for the load-bearing claim. On the unmodified configs the negotiated Keeper session timeout is 10000 on demand, every run, all three configs: the server-side cons four-letter command reports to=10000 while the client requested 30000, and the heartbeat cadence in the server log is 3.333 s (= 10000/3), matching the master-hit artifact. The downstream timing race is not locally reproducible and is not claimed to be (row e).
b Root cause explained? Yes. keeper_server.coordination_settings.session_timeout_ms is the server's max cap (KeeperTCPHandler.cpp:254), while min_session_timeout defaults to DEFAULT_MIN_SESSION_TIMEOUT_MS = 10000 (:253). The <zookeeper> blocks set no client timeout, so the client requests DEFAULT_SESSION_TIMEOUT_MS = 30000 and the negotiation computes min(max(30000, 10000), 10000) = 10000 (:436-439). With max == min the clamp is unconditional, so a quiet period past 10 s finalizes the session mid-DDL and the cleanup DROP/DETACH surfaces Connection loss from DatabaseReplicatedWorker.cpp:458.
c Fix matches root cause? Yes - it corrects the misused knob itself, in the file that set it wrong. Not a band-aid: no retry wrapper, no widened bound, no reduced dataset, no no-parallel, no weakened assertion. Rejected alternatives: a test-level retry (exec_query_with_retry retries bare Exception, so it would also swallow the assertions these tests exist to make); lowering min_session_timeout_ms (keeps the 10 s ceiling); a client-side-only timeout (leaves a misleading server cap in place).
d Test intent preserved / new tests? Yes. No existing test logic, assertion, failpoint sequence, sleep or poll bound changed, and the load-bearing DETACH TABLE rdb8.mv PERMANENTLY SYNC (test.py:777, whose comment at :770-776 explains it is the mechanism under test) is untouched. The existing tests are the coverage the fix restores: today the failure aborts them before their Keeper assertions run. New coverage was added for the fix's own invariant - a read-only helper asserts, once per edited config file, that the negotiated session timeout is 30000, read from the server-side cons four-letter command (in-tree precedent: test_keeper_four_word_command/test.py:421). Without it, reverting any single config would leave the suite green.
e Both directions demonstrated? Yes, on each of the three configs: cons to= 10000 -> 30000 and cadence 3.333 s -> 10.0 s; module 9/9 with the fix. Now also demonstrated through the new assertion, per file: three separate arms each reverted exactly one config to 10000 and left the other two at 30000, and in each arm the test that activates that config failed only on the new assertion, reporting the observed value - AssertionError: (30000, [10000], ...). So each file is independently load-bearing and a partial fix is caught by CI, not by a by-hand measurement. The assertion is also proven non-vacuous (a deliberately wrong expectation fires carrying the real list) and its self-connection filter is proven required: cons answers on its own never-handshaked connection, which reports to=0, so unfiltered the check would read [0, 30000] and fail on every healthy run. The Connection loss race itself did not reproduce locally (0 occurrences in any arm) - stated plainly rather than claimed. The existence poll added for the asynchronous-session window is demonstrated in both directions too: driving the shipped helper against a stubbed cons feed, a session that appears only on the 4th read is picked up (4 reads, 1.5 s) while a session already present costs 1 read, a clamped value still fails on the first read, and an empty list terminates on the budget with the original message; three mutations each break exactly one of those directions (removing the poll breaks the late-session case, retrying the value turns the clamped case from 0.0 s into 30 s, dropping the self-connection filter breaks the healthy case). On a real server the empty-list path was also forced by widening the filter to drop every session, and it failed with the unchanged message text.
f General across code paths? Yes. Carrier set proven complete: git ls-tree shows exactly 4 files in configs/, the 4th (settings.xml) carries no Keeper keys; all three Keeper configs had the identical 10000 block and all three are fixed, ending with byte-identical coordination_settings blocks. git grep -l confirms these filenames are referenced only by this suite's test.py, so the blast radius is this suite alone. test_refreshable_mv_keeper_loss deliberately uses a short client-side timeout and is untouched.
g Generalizes across inputs? Yes, checked at both ends of the negotiation: min_session_timeout_ms stays absent (so min(max(30000, 10000), 30000) = 30000), no <zookeeper> block acquired a client-side session_timeout_ms (verified 0 in each file), and operation_timeout_ms is deliberately left at 5000 - git grep coordination_settings.operation_timeout over src/ returns nothing, so it has no consumer outside the coordination settings and never reaches the client.
h Backward compatible? Yes - test configuration only. No src/ change, no setting default changed, no SettingsChangesHistory.cpp implication, no serialization or on-disk format change, nothing user-visible.
i Invariants and contracts preserved? Yes. Sessions get strictly more headroom, never less, so no test depending on a session surviving can regress. All 9 tests were checked: none expires a session on purpose, none sleeps across a session lifetime, none asserts on session expiry (longest sleeps are 3 s). The added comment directs a future author who wants a short session to set it client-side (the test_refreshable_mv_keeper_loss precedent) instead of re-lowering the server cap.

Notes. Integration tests are not subject to --random-settings (grep -c 'random.settings\|random_settings' = 0 for ci/jobs/integration_test_job.py vs 11 for ci/jobs/functional_tests.py; the job drives pytest, never tests/clickhouse-test), so no functional-style 50/50 applies; repeated whole-module runs were used instead. Those repeated runs hit a container-death failure mode that is an environment artifact, not this change: it appears symmetrically in both arms with 0 Connection loss in any run, it reproduces on the unmodified configs with zero PR content, and its cause is cross-slot interference on the shared test host (helpers/cluster.py:1244 runs a global docker volume prune -f --all with no project filter). It recurred in the fix round on a contended host - two tests died at a docker exec / Connection refused with the container already gone, zero <Fatal> lines and zero signals in the server log - and was attributed away from this change by two independent facts: neither failing test calls the added helper at all, and the same whole-module selection passed 9/9 both on the merge-base helper state and, once the host was quiet, on the final tree. XML well-formedness was verified with a parser and empirically by the server parsing each config and starting successfully. The fix round added Python, so style was checked with the version CI pins: ruff 0.15.13 (ci/docker/style-test/requirements.txt), run exactly as ci/jobs/check_style.py runs it - clean on the whole repo and on the touched file, which ruff check --show-files confirms is in scope rather than silently excluded. CI enforces ruff, not black; the local host's newer black would reformat pre-existing triple-quoted SQL blocks in this file, but that residue is identical on the merge-base and touches none of the added lines.

Session id: cron:clickhouse-review-slot-48:20260730-013900

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @al13n321, could you review this? The refreshable-MV Keeper suite set its embedded Keeper's maximum session timeout to the same value as the default minimum, so every session was clamped to 10 s and a stall past that dropped the session under the cleanup DDL; the negotiated timeout is now asserted in-tree, once per config file.

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Jul 30, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [0785e29]

Summary: ✅


AI Review

Summary

This PR raises the embedded Keeper max session timeout in the three test_refreshable_mv_no_multi_read configs from 10000 to 30000 and adds a cons-based assertion that the negotiated timeout is really 30000 after each config swap. I checked the current diff against the surrounding test code, the server-side handshake and cons implementation, startup ordering for embedded Keeper vs. SQL readiness, prior PR discussion, and the current all-green CI report; I did not find a correctness or reliability issue that warrants an inline review comment.

Final Verdict

✅ No findings.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jul 30, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 0785e29

Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

No failures on this commit. All 174 check-runs completed with zero non-success conclusions
(successes plus skips only), the workflow aggregator finished, and CIDB reports zero
FAIL/ERROR rows for this commit.

Session id: cron:our-pr-ci-monitor:20260730-163853

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doubtful but passable.

@alexey-milovidov alexey-milovidov self-assigned this Jul 30, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 30, 2026
Merged via the queue into ClickHouse:master with commit 11507a0 Jul 31, 2026
178 checks passed
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 31, 2026
@groeneai

groeneai commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

Correcting the "tracked separately" note in this PR's description, and closing it out

I investigated the follow-up this PR's description points at, and the note itself is wrong in two ways. Correcting it here so nobody chases it.

The note says: "DatabaseReplicatedDDLWorker::enqueueQuery discards its ZooKeeperRetriesInfo (DatabaseReplicatedWorker.cpp:337-341) where the base honours it."

1. That override is unreachable. DDLWorker::enqueueQuery (DDLWorker.h:72) has exactly one call site, executeDDLQueryOnCluster.cpp:201, whose receiver is context->getDDLWorker(). That object is constructed once as a base DDLWorker (programs/server/Server.cpp:3512, the sole setDDLWorker caller). The per-database DatabaseReplicatedDDLWorker is a separate std::unique_ptr<DatabaseReplicatedDDLWorker> member (DatabaseReplicated.h:279), never upcast to DDLWorker&, and none of the ddl_worker-> calls in DatabaseReplicated.cpp is enqueueQuery. So virtual dispatch to that override never occurs and the unnamed parameter has no observable effect; it is an artifact of 982b67fb22b0bb0 widening the virtual's signature.

2. There is no asymmetry to restore anyway. The base honours the retries info only under if (retries_info.max_retries > 0) (DDLWorker.cpp:1160-1172), and DDLQueryOnClusterParams::retries_info is default-constructed with max_retries = 0. Of the 34 executeDDLQueryOnCluster( call sites in src/, exactly one assigns it: Backups/BackupsWorker.cpp:1175. Every interpreter caller leaves it at zero.

The reachable site was this suite's own misconfiguration, and this PR fixed it. The genuinely unretried read is zookeeper->get(.../max_log_ptr) in tryEnqueueAndExecuteEntry (DatabaseReplicatedWorker.cpp:458), which is where the reported Coordination error: Connection loss, path /clickhouse/rdb8/max_log_ptr came from. Over 90 days, keying on that stack frame, there are 224 failing rows across 92 PRs, of which only three carry a retriable Keeper error, and only one is at that path: the master hit this PR was opened for, from test_refreshable_mv_no_multi_read, caused by the 10 s session clamp fixed here. Since this merged there are zero retriable-Keeper rows at that frame, against a control of 19 rows / 12 PRs at the same frame in the same window, so the frame is still being exercised. The remaining two rows are a different path (/clickhouse/stop_replicated_ddl_queries/1, written in DDLTask.cpp:711 well past the enqueue) and a second hit of the same clamped suite.

I am not opening a follow-up PR, for three reasons. Wrapping that read in ZooKeeperRetriesControl measurably regresses test_replicated_database::test_recover_staled_replica{,_many_mvs}, which drop the replica's Keeper connection and assert the DDL fails promptly; with default keeper_max_retries=10 the client instead hits its 600 s cap. A smaller budget does not rescue it either: a hardware error finalizes the session (ZooKeeperImpl.cpp:1405), so the next attempt must build a new one, and Context::getZooKeeper calls startNewSession() while holding the process-global shared->zookeeper_mutex (Context.cpp:5694, :5730) across a synchronous connect() that itself retries three times per node at a 1 s timeout. That serializes every Keeper consumer in the server, repeatedly, exactly when Keeper is already unhealthy. And #109465 set the precedent in the other direction: it made transient Keeper errors surface as retriable query errors rather than absorbing them, which is what already happens here, and tests/clickhouse-test treats Coordination::Exception: Connection loss as retriable for the same reason.

If absorbing it in the server is wanted, the shape would have to be opt-in rather than on by default, and that is a policy call for the engine owners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants