Repository navigation
fix: distinguish durable pipeline termination from queue delivery - #29549
Merged
Merged
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
commented
Oct 1, 2026
XuPeng-SH
left a comment
Contributor
Author
There was a problem hiding this comment.
代码评审结论:当前 head 99c372f 未发现阻塞问题;建议无阻塞。
- PipelineEdge 继续作为终止状态的唯一所有者;PublishTerminal 将持久终止状态与队列投递结果分开,既有 Try/Send 布尔语义保持不变。
- Connector、Dispatch 和 remote-notify 清理共用该终止状态及既有接收/错误选择路径。Dispatch 的多接收者失败场景复用现有错误解析器,保留真实错误原因。没有增加新的状态机或数据路径状态。
- 失败、满队列、部分 End、重复终止、首错保留、spool/account 回收及复用均有组件验证;三 CN SQL 取消验证检查远端 sender/stream 收敛和后续查询。生产代码净减,测试扩展复用既有组件 fixture。
限制:SQL 取消测试在聚合前设 barrier,因此不证明被取消查询本身发生 spill;也没有复现原 TKE 1000 万行规模,或证明历史内存泄漏。CI 尚有检查运行中,本评审未等待 CI。
这是 PR 作者提交的 COMMENT review,不是 GitHub APPROVE。
1 of 7 tasks
This branch was previously deployed
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.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #29492
What this PR does / why we need it:
Terminal cleanup confused an unsuccessful channel enqueue with an unsuccessful
terminal publication. The edge had already recorded the fatal cause and closed
Done, and receivers could recover the terminal from durable edge state. Full
channels and End after cancellation therefore produced misleading
timeout=30swarnings and abnormal-cleanup metrics despite nonblocking publication.
Use PipelineEdge's existing terminal state as the single owner of cleanup
publication. PublishTerminal returns the effective terminal and whether durable
publication is satisfied; existing Try/Send boolean behavior is preserved.
Connector, Dispatch and remote-notify cleanup use that result. Remove duplicated
terminal logic, ineffective enqueue retries, fallback sends and cleanup timers.
Normal End preserves queued data and deferred spool reclamation. Error/Abort and
End superseded by a fatal terminal abort with the original cause; allocation
account finalization still waits for consumer quiescence. Missing edges/channels
remain diagnosed, without calling a nonblocking failure a timeout. Dispatch
reuses the existing resolver to prefer substantive errors over synthetic delivery
fallout. No wire, stored-data, catalog or mixed-upgrade mechanism changes.
Validation
three abnormal-cleanup events for an already durable cancellation, in 0.00s;
fixed source recorded zero. Permanent assertions extend existing full-queue,
original-cause and spool-reclamation fixtures instead of retaining the probe.
Error/Abort first-cause preservation, duplicates, graceful completion, invalid
input and reuse. Missing-register tests require diagnostics and reclamation.
Focused lifecycle regressions additionally pass 100 race repetitions each.
a successful percentile spill control (
SpillRows=49152), serverKILL QUERYat an observable execution barrier with live remote senders, expected
cancellation, sender/FIN lifecycle gauges returning to zero, unchanged cleanup
failure counters, and exact percentile results on every CN. Test body 18.97s.
The canceled black-box query is deliberately gated before aggregation; the
successful spill control is not evidence that cancellation itself reached spill.
Strict full-channel causality is proved by component tests. This is not a claim
of reproducing the original TKE 10M-row scale or proving a historical memory leak.
The reported 30s was a configured value, not a measured cleanup delay.
Engineering and performance
No new state machine, stored state, retry policy or production test hook. The
production delta is a net reduction; normal data forwarding is unchanged and
cleanup removes timers, retry bookkeeping and false warning/metric work. Tests
reuse existing component fixtures; the separate SQL fixture is isolated because
it explicitly requires three CNs and forced remote placement.
Design and final overall review: gpt-6.1-sol / xhigh. CI remains pending; local
validation is reported separately and no CI wait is implied.