Skip to content

fix(pipeline): preserve terminal cause during spool abort - #26324

Merged
mergify[bot] merged 4 commits into
matrixorigin:mainfrom
aptend:fix/26322-preserve-pipeline-error
Jul 28, 2026
Merged

mergify[bot] merged 4 commits into
matrixorigin:mainfrom
aptend:fix/26322-preserve-pipeline-error

Conversation

@aptend

@aptend aptend commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

fixes #26322

What this PR does / why we need it:

When normal End delivery fails on a shared PipelineEdge that already records a real terminal error, Connector or Dispatch cleanup currently aborts its spool with ErrPipelineEndSignalDeliveryFailed. Buffered spool signals can then surface that synthetic cleanup error before the durable execution error.

This change resolves the spool abort cause from receiver edges first and only falls back to ErrPipelineEndSignalDeliveryFailed when no more specific terminal error exists. It keeps the terminal wakeup and bounded cleanup behavior from #26250 unchanged.

Validation:

  • focused Connector regression with -race -count=20
  • go test -race -count=1 ./pkg/vm/process ./pkg/sql/colexec/connector ./pkg/sql/colexec/dispatch
  • go test -count=1 ./pkg/vm/pipeline
  • go build and go vet for all changed packages plus pkg/vm/pipeline

@aptend
aptend force-pushed the fix/26322-preserve-pipeline-error branch from 70e78e7 to 65ad385 Compare July 28, 2026 11:16
@matrix-meow matrix-meow added size/S Denotes a PR that changes [10,99] lines and removed size/M Denotes a PR that changes [100,499] lines labels Jul 28, 2026
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep-reviewed the cleanup lifecycle and failure precedence at the latest head. The change preserves a durable receiver-edge cause before aborting queued spool work, retains the synthetic delivery error only as fallback, keeps first-fatal-wins semantics, adds no normal data-path cost, and does not extend the bounded send budget. Race tests for process, connector, and dispatch pass. No blocker found.

@mergify mergify Bot added the queued label Jul 28, 2026
@mergify

mergify Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-07-28 13:17 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-07-28 14:27 UTC · at 168f78b9a3f128541795ca15797470191c683cef · squash

This pull request spent 1 hour 10 minutes 1 second in the queue, including 40 minutes 19 seconds running CI.

Required conditions to merge
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection] (documentation)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Linux/arm64
    • check-neutral = Matrixone CI / SCA Test on Linux/arm64
    • check-skipped = Matrixone CI / SCA Test on Linux/arm64
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86

@mergify
mergify Bot merged commit 522a157 into matrixorigin:main Jul 28, 2026
24 of 25 checks passed
@mergify mergify Bot removed the queued label Jul 28, 2026
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…in#26324)

When normal End delivery fails on a shared `PipelineEdge` that already records a real terminal error, Connector or Dispatch cleanup currently aborts its spool with `ErrPipelineEndSignalDeliveryFailed`. Buffered spool signals can then surface that synthetic cleanup error before the durable execution error.

This change resolves the spool abort cause from receiver edges first and only falls back to `ErrPipelineEndSignalDeliveryFailed` when no more specific terminal error exists. It keeps the terminal wakeup and bounded cleanup behavior from matrixorigin#26250 unchanged.

Validation:

- focused Connector regression with `-race -count=20`
- `go test -race -count=1 ./pkg/vm/process ./pkg/sql/colexec/connector ./pkg/sql/colexec/dispatch`
- `go test -count=1 ./pkg/vm/pipeline`
- `go build` and `go vet` for all changed packages plus `pkg/vm/pipeline`

Approved by: @XuPeng-SH
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…in#26324)

When normal End delivery fails on a shared `PipelineEdge` that already records a real terminal error, Connector or Dispatch cleanup currently aborts its spool with `ErrPipelineEndSignalDeliveryFailed`. Buffered spool signals can then surface that synthetic cleanup error before the durable execution error.

This change resolves the spool abort cause from receiver edges first and only falls back to `ErrPipelineEndSignalDeliveryFailed` when no more specific terminal error exists. It keeps the terminal wakeup and bounded cleanup behavior from matrixorigin#26250 unchanged.

Validation:

- focused Connector regression with `-race -count=20`
- `go test -race -count=1 ./pkg/vm/process ./pkg/sql/colexec/connector ./pkg/sql/colexec/dispatch`
- `go test -count=1 ./pkg/vm/pipeline`
- `go build` and `go vet` for all changed packages plus `pkg/vm/pipeline`

Approved by: @XuPeng-SH
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…in#26324)

When normal End delivery fails on a shared `PipelineEdge` that already records a real terminal error, Connector or Dispatch cleanup currently aborts its spool with `ErrPipelineEndSignalDeliveryFailed`. Buffered spool signals can then surface that synthetic cleanup error before the durable execution error.

This change resolves the spool abort cause from receiver edges first and only falls back to `ErrPipelineEndSignalDeliveryFailed` when no more specific terminal error exists. It keeps the terminal wakeup and bounded cleanup behavior from matrixorigin#26250 unchanged.

Validation:

- focused Connector regression with `-race -count=20`
- `go test -race -count=1 ./pkg/vm/process ./pkg/sql/colexec/connector ./pkg/sql/colexec/dispatch`
- `go test -count=1 ./pkg/vm/pipeline`
- `go build` and `go vet` for all changed packages plus `pkg/vm/pipeline`

Approved by: @XuPeng-SH

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: pipeline cleanup fallback masks the original execution error

3 participants