Repository navigation
fix(compile): preserve remote pipeline error causes - #27150
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? |
aptend
left a comment
There was a problem hiding this comment.
Deep review completed on exact head 85ff199ae208747bcea6032824d118f2820b5d7e.
The change correctly reuses the established cause-aware scope normalization before remote root cleanup can mutate the pipeline context. Substantive cancellation causes survive both RemoteRun and remote receiver-notification failures; normal internal QueryInterrupted fallout remains suppressible; raw registration-retry cancellation keeps its historical classification when there is no stronger cause; mixed/substantive errors and query-owned deadline/cancellation behavior remain unchanged.
I traced the remote send/receive, pipeline/context ownership, sibling cancellation, root cleanup, notify retry, terminal-signal, and MergeRun result-collection paths. The focused new tests plus existing primary-error/cancellation controls pass with the required CGO/thirdparties setup, all required GitHub checks are green, and git diff --check is clean. No blocking findings.
|
Queued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 1 hour 57 minutes 45 seconds in the queue, with no time running CI. Waiting for any of
All conditions
ReasonPull request #27150 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
Failing checks: HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review completed on exact head c8e79f2564710eb3a3d1b1edd2c2846bd4bd0e11.
No blocking findings. The change resolves the cancellation cause before CleanRootOperator can mutate the pipeline context, so a substantive remote execution error is preserved through both RemoteRun and receiver-notification failure paths. Normal internal QueryInterrupted fallout remains secondary, query-owned cancellation/deadline classification is preserved, raw registration-retry cancellation remains visible when no stronger cause exists, and independent/non-cancellation errors are not rewritten.
I traced context ownership, remote send/receive, sibling cancellation, notify retry, cleanup terminal delivery, and MergeRun result collection. Validation on this exact head: git diff --check; go list, go build, and go vet for ./pkg/sql/compile; the two new regression tests at -count=100; the same tests under -race -count=100; and the full ./pkg/sql/compile test package. All passed.
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#27115 ## What this PR does / why we need it: Remote pipeline cancellation could replace a substantive execution failure, such as a duplicate-key error, with `query interrupted` and then suppress it. That allowed a failed multi-CN INSERT to be reported as successful. This change: - resolves remote-run cancellation through the pipeline `CancelCause` before operator cleanup mutates the context; - applies the same cause-aware handling to remote receiver notification failures; - preserves raw registration-retry cancellation when no stronger cause exists; and - adds regressions for substantive and ordinary cancellation through both remote paths. Validation: - focused cancellation/error propagation tests; - full `pkg/sql/compile` unit-test package; - affected tests under `-race -count=100`; - full package race suite with three unrelated parquet fanout tests excluded; those three failures reproduce unchanged on pristine `upstream/main`; - `go vet ./pkg/sql/compile` and `git diff --check`. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#27115 ## What this PR does / why we need it: Remote pipeline cancellation could replace a substantive execution failure, such as a duplicate-key error, with `query interrupted` and then suppress it. That allowed a failed multi-CN INSERT to be reported as successful. This change: - resolves remote-run cancellation through the pipeline `CancelCause` before operator cleanup mutates the context; - applies the same cause-aware handling to remote receiver notification failures; - preserves raw registration-retry cancellation when no stronger cause exists; and - adds regressions for substantive and ordinary cancellation through both remote paths. Validation: - focused cancellation/error propagation tests; - full `pkg/sql/compile` unit-test package; - affected tests under `-race -count=100`; - full package race suite with three unrelated parquet fanout tests excluded; those three failures reproduce unchanged on pristine `upstream/main`; - `go vet ./pkg/sql/compile` and `git diff --check`. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#27115 ## What this PR does / why we need it: Remote pipeline cancellation could replace a substantive execution failure, such as a duplicate-key error, with `query interrupted` and then suppress it. That allowed a failed multi-CN INSERT to be reported as successful. This change: - resolves remote-run cancellation through the pipeline `CancelCause` before operator cleanup mutates the context; - applies the same cause-aware handling to remote receiver notification failures; - preserves raw registration-retry cancellation when no stronger cause exists; and - adds regressions for substantive and ordinary cancellation through both remote paths. Validation: - focused cancellation/error propagation tests; - full `pkg/sql/compile` unit-test package; - affected tests under `-race -count=100`; - full package race suite with three unrelated parquet fanout tests excluded; those three failures reproduce unchanged on pristine `upstream/main`; - `go vet ./pkg/sql/compile` and `git diff --check`. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #27115
What this PR does / why we need it:
Remote pipeline cancellation could replace a substantive execution failure, such as a duplicate-key error, with
query interruptedand then suppress it. That allowed a failed multi-CN INSERT to be reported as successful.This change:
CancelCausebefore operator cleanup mutates the context;Validation:
pkg/sql/compileunit-test package;-race -count=100;upstream/main;go vet ./pkg/sql/compileandgit diff --check.