Repository navigation
fix(compile): keep remote receiver stop non-terminal - #28128
Conversation
(cherry picked from commit a2db35f)
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
left a comment
There was a problem hiding this comment.
Deep-reviewed the 4.2 backport at exact head 8641c27 against 4.2-dev@4f62825d33425c5d5253f94b8ad37d41357aa7ab.\n\nThe cherry-pick has the same stable patch-id as main commit a2db35f, and the 4.2 branch contains the required stream reuse, batch-credit, pending-StopSending tombstone, and pipeline/query cancellation separation.\n\nCounterexamples checked: receiver stop before/after lifecycle registration, receiver stop racing query cancellation or connection closure, a substantive execution error racing cancellation, repeated terminal events, late ACK, and protocol/FIN cleanup. Receiver-driven stop is suppressed only while both external contexts remain active and the first recorded cause is cancellation-shaped; query/connection cancellation and substantive errors remain terminal. First-terminal classification is mutex-serialized.\n\nLifecycle audit: no new resource owner; StopSending clears bounded pending credits and notifies all drain waiters; context cancellation and the existing 30-second FIN boundary terminate remaining waits; pending accounting remains capped at 8 batches / 64 MiB. The added terminal mutex read is off the batch hot path and has no material performance impact.\n\nExact-head UT, SCA, coverage, shared build, connector, and BVT checks are green; git diff --check passes. No blocking correctness, liveness, resource, compatibility, or performance issue found.\n\nThis addresses the receiver-stop misclassification, but #27757 should remain open until the real 10M IVFFlat workload is repeated with zero cancellation/RPC errors.
Merge Queue Status
This pull request spent 30 seconds in the queue, including 1 second running CI. Required conditions to merge
|
(cherry picked from commit a2db35f)
What type of PR is this?
Which issue(s) this PR fixes:
issue #27757
What this PR does / why we need it:
Fix remote pipeline cancellation handling for issue #27757.
This change distinguishes receiver-driven StopSending from actual query or connection cancellation:
Treat internal downstream early-stop, such as LIMIT, as successful and allow connection reuse.
Keep query cancellation and connection cancellation terminal, returning an error and poisoning the
connection.
Keep substantive remote execution errors terminal.
Preserve the first terminal batch-flow classification to avoid cancellation races.
Add regression tests covering internal early-stop, query cancellation, connection cancellation, and
substantive errors.