Repository navigation
fix(compile): keep remote receiver stop non-terminal - #28072
mergify[bot] merged 2 commits into
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
left a comment
There was a problem hiding this comment.
Deep-reviewed exact head 34f2a28c938caa6831bebb9380f43b20b0dc9a49 against main@ffc8d9f0625c76e87ba967984ce19db2d082b0ba.
I reviewed all three changed files and traced the server handler, pending StopSending tombstone, batch-credit flow, client terminal classification, FIN/ACK reuse boundary, and query/pipeline context normalization. Counterexamples covered receiver stop before and after query cancellation, connection closure, a substantive execution failure, late ACK, and StopSending before lifecycle registration.
The first terminal flow classification is serialized by the existing mutex. A receiver-owned stop can only be suppressed when both external contexts remain active and the recorded cause is cancellation-shaped; message/query cancellation and connection closure are checked first, while substantive MergeRun errors remain terminal. The pending-stop registration race converges through the colexec tombstone plus lifecycle check. Q1 has no new resource owner, Q2 retains the independently cancellable drain/FIN bounds, and Q3 adds no queue or retained-state growth. The extra mutex read occurs only at terminal drain, so there is no material hot-path cost.
The focused regression covers internal stop, external query/connection cancellation, first-terminal-wins, substantive abort, and accounting release. Exact-head MatrixOne UT/SCA/BVT/coverage is green and git diff --check passes. I could not substitute a local focused/race run because this isolated head has no matching CGo artifact and the primary worktree native inputs differ; the exact-head CI evidence remains valid for the normal package/build paths.
No blocking correctness, liveness, resource, compatibility, or performance issue found.
Merge Queue Status
This pull request spent 33 seconds in the queue, including 3 seconds running CI. Required conditions to merge
|
) Fix remote pipeline cancellation handling for issue matrixorigin#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. Approved by: @XuPeng-SH
) Fix remote pipeline cancellation handling for issue matrixorigin#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. Approved by: @XuPeng-SH
) Fix remote pipeline cancellation handling for issue matrixorigin#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. Approved by: @XuPeng-SH
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.