Repository navigation
fix(pipeline): preserve terminal errors across spool abort - #25620
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? |
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…gin#25620) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#24971 ## What this PR does / why we need it: A failing producer pipeline sends its typed terminal error and then aborts its pipeline spool to reclaim queued batches. If a receiver already has a `GetFromSpool` signal ahead of the terminal signal, that signal observes the aborted spool first. The spool previously returned the generic `pipeline spool aborted` sentinel, masking the producer's real error. This was observed when a recursive CTE correctly raised `recursive level out of range`, but the client intermittently received the generic spool error. This PR makes the spool's abort cause explicit and first-wins: - `PipelineSpool.Abort(cause)` preserves the original terminal cause; nil retains the generic sentinel fallback. - Connector and dispatch pass the execution error on failed pipelines. - A graceful End delivery failure uses `ErrPipelineEndSignalDeliveryFailed`. - Regression tests cover queued data before both delivered and undeliverable terminal signals, shared dispatch spools, nil causes, and repeated Abort calls. The change is cleanup-only: it adds no goroutines, waits, allocations, or data-path branches. Validation: - `go test -count=1` and `go test -race -count=1` for `pSpool`, `connector`, and `dispatch` - dependent tests for `process`, `pipeline`, `merge`, and `mergecte` - `go build`, `go vet`, `molint`, and `make err-check` - full `make build` - online recursive CTE error reproduced 100 times with the expected error - `recursive_cte.sql` BVT: 45/45 passed
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…gin#25620) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#24971 ## What this PR does / why we need it: A failing producer pipeline sends its typed terminal error and then aborts its pipeline spool to reclaim queued batches. If a receiver already has a `GetFromSpool` signal ahead of the terminal signal, that signal observes the aborted spool first. The spool previously returned the generic `pipeline spool aborted` sentinel, masking the producer's real error. This was observed when a recursive CTE correctly raised `recursive level out of range`, but the client intermittently received the generic spool error. This PR makes the spool's abort cause explicit and first-wins: - `PipelineSpool.Abort(cause)` preserves the original terminal cause; nil retains the generic sentinel fallback. - Connector and dispatch pass the execution error on failed pipelines. - A graceful End delivery failure uses `ErrPipelineEndSignalDeliveryFailed`. - Regression tests cover queued data before both delivered and undeliverable terminal signals, shared dispatch spools, nil causes, and repeated Abort calls. The change is cleanup-only: it adds no goroutines, waits, allocations, or data-path branches. Validation: - `go test -count=1` and `go test -race -count=1` for `pSpool`, `connector`, and `dispatch` - dependent tests for `process`, `pipeline`, `merge`, and `mergecte` - `go build`, `go vet`, `molint`, and `make err-check` - full `make build` - online recursive CTE error reproduced 100 times with the expected error - `recursive_cte.sql` BVT: 45/45 passed
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…gin#25620) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#24971 ## What this PR does / why we need it: A failing producer pipeline sends its typed terminal error and then aborts its pipeline spool to reclaim queued batches. If a receiver already has a `GetFromSpool` signal ahead of the terminal signal, that signal observes the aborted spool first. The spool previously returned the generic `pipeline spool aborted` sentinel, masking the producer's real error. This was observed when a recursive CTE correctly raised `recursive level out of range`, but the client intermittently received the generic spool error. This PR makes the spool's abort cause explicit and first-wins: - `PipelineSpool.Abort(cause)` preserves the original terminal cause; nil retains the generic sentinel fallback. - Connector and dispatch pass the execution error on failed pipelines. - A graceful End delivery failure uses `ErrPipelineEndSignalDeliveryFailed`. - Regression tests cover queued data before both delivered and undeliverable terminal signals, shared dispatch spools, nil causes, and repeated Abort calls. The change is cleanup-only: it adds no goroutines, waits, allocations, or data-path branches. Validation: - `go test -count=1` and `go test -race -count=1` for `pSpool`, `connector`, and `dispatch` - dependent tests for `process`, `pipeline`, `merge`, and `mergecte` - `go build`, `go vet`, `molint`, and `make err-check` - full `make build` - online recursive CTE error reproduced 100 times with the expected error - `recursive_cte.sql` BVT: 45/45 passed
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:
issue #24971
What this PR does / why we need it:
A failing producer pipeline sends its typed terminal error and then aborts its pipeline spool to reclaim queued batches. If a receiver already has a
GetFromSpoolsignal ahead of the terminal signal, that signal observes the aborted spool first. The spool previously returned the genericpipeline spool abortedsentinel, masking the producer's real error. This was observed when a recursive CTE correctly raisedrecursive level out of range, but the client intermittently received the generic spool error.This PR makes the spool's abort cause explicit and first-wins:
PipelineSpool.Abort(cause)preserves the original terminal cause; nil retains the generic sentinel fallback.ErrPipelineEndSignalDeliveryFailed.The change is cleanup-only: it adds no goroutines, waits, allocations, or data-path branches.
Validation:
go test -count=1andgo test -race -count=1forpSpool,connector, anddispatchprocess,pipeline,merge, andmergectego build,go vet,molint, andmake err-checkmake buildrecursive_cte.sqlBVT: 45/45 passed