Repository navigation
Do not strand processors queued for removal in ExecutingGraph - #115800
Closed
alexey-milovidov wants to merge 2 commits into
Closed
alexey-milovidov wants to merge 2 commits into
alexey-milovidov wants to merge 2 commits into
Conversation
Processor removal became deferred: `updatePipeline` only records `update.to_remove` into a pending group and `updateNode` retires the group once every processor in it reports `Finished`. Two paths leave a recorded group behind, so the processors stay in the pipeline until the whole query is destroyed: - `updatePipeline` records the group and then returns `Cancelled`, which makes `updateNode` return before it reaches the code that retires groups; - the retiring code handles a single group per prepared node, so a backlog can outlive the last `updateNode` call. Retire every group that is ready instead of one, and also do it on the way out when `updatePipeline` does not return `Done`. This is what `Processors.UpdatePipelineMultipleCoordinatorsMultithreaded` caught on master: it cancels the executor while 16 coordinators are cycling, so one of them gets its removal stranded and an extra source is still alive at the end of the test. https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=b16561cc816cf56cadd0c35ed9ad48964ad7758d&name_0=MasterCI&name_1=Unit%20tests%20%28amd_llvm_coverage%29 Caused by: #115625 Co-Authored-By: Claude Fable 5 <[email protected]>
Contributor
Michicosun
approved these changes
Aug 21, 2026
Michicosun
enabled auto-merge
August 21, 2026 15:15
alexey-milovidov
added a commit
that referenced
this pull request
Aug 21, 2026
Brings in #115800, which the re-landed change needs: processors queued for removal were left in the graph when `updatePipeline` returned `Cancelled`, or when more than one group became removable between two prepared nodes. Co-Authored-By: Claude Fable 5 <[email protected]>
Member
Author
auto-merge was automatically disabled
August 21, 2026 15:38
Pull request was closed
alexey-milovidov
added a commit
that referenced
this pull request
Aug 28, 2026
…ategory **`release_range_prs` read every `(#N)` in a subject.** A squashed revert quotes the original title, `Revert "Something (#90000)" (#115800)`, and the quoted number would put a pull request of an earlier release into this range - the very distinction the caller uses the range for, so a revert of it would look like something this release cancels out rather than a user-visible reversal. Both shapes are now anchored: the squash number ends the subject, the `Merge pull request #N` one starts it. That shape does not occur in the last 60000 commits of this repository, where reverts land as merge commits, so this is hardening rather than a live bug. The anchored form is the right parse either way, and the regression pins it along with a fork's own `Merge pull request #4` appearing mid-line. **A sibling moved between categories made the merge impossible.** The category check demanded the recorded header while the shared-bullet rule demanded a merge into the surviving bullet, so once an edit had moved that bullet the two contradicted each other and no edit could pass. The expected category is now the surviving bullet's current one when there is a sibling to merge into, and the recorded one otherwise: the check follows the bullet rather than a remembered header. The two rules then compose instead of fighting - moving the whole merged bullet elsewhere stays legal, while leaving the survivor and restoring the entry beside it under the old header is rejected, which the test asserts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #115625
Processor removal in
ExecutingGraphrecently became deferred:updatePipelineonly recordsupdate.to_removeinto a pending group, andupdateNoderetires that group once every processor in it reportsFinished.Two paths leave a recorded group behind, so its processors stay in the pipeline until the whole query is destroyed:
updatePipelinerecords the group and then returnsCancelled, which makesupdateNodereturn before it reaches the code that retires groups;updateNodecall.This change retires every group that is ready instead of just one, and also retires them on the way out when
updatePipelinedoes not returnDone.This is what
Processors.UpdatePipelineMultipleCoordinatorsMultithreadedcaught on master — it cancels the executor while 16 coordinators are cycling, so one of them gets its removal stranded and an extra source is still alive at the end of the test:https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=b16561cc816cf56cadd0c35ed9ad48964ad7758d&name_0=MasterCI&name_1=Unit%20tests%20%28amd_llvm_coverage%29
The existing test only reproduces this rarely, so a deterministic one is added:
Processors.UpdatePipelineRemovalIsNotStrandedByCancellationcancels the pipeline from insideprepare, so theupdatePipelinethat retires the source is exactly the one that observes the cancellation. It fails before this change and passes after it.Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/115800]