Repository navigation
Preserve non-clonable sources for deferred set builds - #114849
alexey-milovidov wants to merge 7 commits into
Conversation
`FutureSetFromSubquery::buildOrderedSetInplace` used to consume the only source plan when `QueryPlan::clone` was not supported. If the speculative pipeline stopped before `Set::finishInsert`, the deferred build could not create the set and `FunctionIn` received a not-ready set. Skip the speculative index optimization for non-clonable local sources and preserve the plan for `DelayedCreatingSetsStep`. Add a deterministic regression using `ReadFromRemote` with an unavailable shard. #107619 (comment)
|
Workflow [PR], commit [7af90eb] Summary: ❌
|
|
🕵 Closing as already integrated: |
No? |
|
🕵 You are right. I fetched the current refs and verified that |
|
🕵 @groeneai, investigate the unrelated Fast test failures in https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=114849&sha=aa0e8e9328e409480f5300cfd97f0a44d1145bc7&name_0=PR&name_1=Fast%20test and provide fixes in separate PRs if they are still reproducible on current |
|
These five are not unrelated: all of them are caused by this PR, and none of them reproduces on current Mechanism. The new Proof, both directions. I applied only that one line on top of pristine
The
CIDB, 30 days. Zero failures on Suggestion. The two goals are separable: keep the source for the deferred build, but still return a set for index analysis. Falling through to the destructive build only when the speculative one cannot run at all would preserve the old index behaviour, and |
|
🕵 Superseded by #114983. The Fast-test failures and the review establish that skipping |
Closes: #107619
Related: #107619 (comment)
The speculative ordered-set build used for index analysis consumed non-clonable source plans before it knew whether the set was complete. If a
ReadFromRemotepipeline stopped on an unavailable shard beforeSet::finishInsert, the deferred build had no source left andFunctionInreceived a not-ready set.Preserve non-clonable local sources by skipping the speculative index optimization and letting
DelayedCreatingSetsStepperform the authoritative build. The regression test uses the deterministic five-parttest_unavailable_shardreproducer from the linked issue comment and verifies thatALL_CONNECTION_TRIES_FAILEDpropagates normally.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix queries with an
INsubquery over unavailable remote shards potentially raising theNot-ready Set is passed as the second argumentlogical exception instead of the underlying connection exception.