Repository navigation
Refuse a disabled stateless worker client before validating the worker cluster - #126660
Conversation
On a server without a `stateless_worker_client` block (the stock config, and the NightlySQLancer server) `make_distributed_plan = 1` failed with NO_ELEMENTS_IN_CONFIG "No default stateless worker cluster is configured; set `distributed_plan_worker_cluster` to one of: ." (an empty list). `StatelessWorkersProviderRegistry::getProvider` canonicalized the cluster selection first, and the `enabled` check lived in `buildProvider`, after it. ClickHouse#124938 removed the check from `fillWorkerAddresses` because "resolving a new provider is refused by the registry (SUPPORT_IS_DISABLED)", but that held only when a disabled client still named a worker source. Check `enabled` at the start of `getProvider` and drop the duplicate in `buildProvider` (its only caller, same configuration object). A disabled client never resolved a provider before either: a cached entry's signature never matches the empty signature of a disabled client, so only the error changes. A query that already resolved its provider still drains on it, since `Context::getStatelessWorkersProvider` never re-enters the registry. The SQLancer DistributedPlanEquivalence oracle expects SUPPORT_IS_DISABLED but not the new message, so every database was a finding and the 2026-10-19 nightly stopped at the 2000-finding cap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review: my own cold review plus an independent model (engine: codex). 0 findings from either.
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-10:20261019-092600 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261019-090000 |
|
cc @serxa @davenger, could you review this and add the |
|
Workflow [PR], commit [9731b22] Summary: ✅
AI ReviewSummaryPR #126660 restores Final VerdictStatus: ✅ Approve |
CI finish ledger - acf8e02Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
The other 3 tests counted as failed in the ParallelReplicas job are Session id: cron:our-pr-ci-monitor:20261021-090014 |
|
@groeneai ping me when its ready to be merged |
|
@serxa it is ready from my side. CI on acf8e02 has finished, and none of the failures come from this diff:
If you want a green |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 6 s compile time in total, 7 of them have a recent master baseline. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
A query with
make_distributed_plan = 1on a server that configures no stateless workers is refused withSUPPORT_IS_DISABLEDagain, instead ofNO_ELEMENTS_IN_CONFIGwith an empty cluster list.Description
Related: #124938
Since #124938, a server without a
stateless_worker_clientblock (the stock config, and the NightlySQLancer server) answersmake_distributed_plan = 1withCode: 139 ... No default stateless worker cluster is configured; set `distributed_plan_worker_cluster` to one of: . (NO_ELEMENTS_IN_CONFIG).StatelessWorkersProviderRegistry::getProvidervalidated the cluster selection first, and the "client is not enabled" check (SUPPORT_IS_DISABLED) sat inbuildProvider, after it. #124938 moved that check out offillWorkerAddressessaying that resolving a new provider is refused by the registry withSUPPORT_IS_DISABLED, but the registry did so only when a disabled client still named a worker source.The SQLancer
DistributedPlanEquivalenceoracle expectsSUPPORT_IS_DISABLEDbut not the new message, so the 2026-10-19 nightly (SQLancer (arm_asan_ubsan)) got one finding per database, hit the 2000-finding cap and stopped after 299k queries (arm_release too). The 2026-10-16 run, before #124938, ran 969k queries with no findings.getProvidernow checksstateless_worker_client.enabledbefore the selection and throwsSUPPORT_IS_DISABLED; the duplicate check inbuildProvideris removed. A disabled client never got a provider before either, so only the error changes. A query that already resolved its provider still drains on it.Validation: the new gtest
Context.RefusesProviderWhenClientIsNotConfiguredfails without the fix (139 vs 344) and passes with it. A server started as the SQLancer job starts it gives Code 139 for the failing CI query on master and 344 with the fix. Distributed-plan tests on real workers pass unchanged. The oracle'smake_distributed_planprofile is skipped on that server both before #124938 and after this fix; running it for real is a job-config choice.Workflow [PR]
Sync PR [sync-upstream/pr/126660]
Version info
26.11.1.1029-master(included in26.11and later)