Skip to content

fix(pipeline): scope StopSending cancellation to remote pipeline - #27458

Merged
mergify[bot] merged 3 commits into
matrixorigin:mainfrom
aptend:fix/27261-pipeline-local-stop
Aug 21, 2026
Merged

mergify[bot] merged 3 commits into
matrixorigin:mainfrom
aptend:fix/27261-pipeline-local-stop

Conversation

@aptend

@aptend aptend commented Aug 21, 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 #27261

What this PR does / why we need it:

StopSending is a normal downstream early-stop signal, but the remote pipeline registry stored the query cancel function. When a LIMIT finished while a remote reader was still in flight, this canceled the remote query context and leaked context canceled from the query.

This change stores the root remote pipeline cancel function instead, so StopSending, pre-registration tombstones, and session cleanup stop only that pipeline tree. It also removes the broad remote-cancellation suppression and restores genuine remote query cancellation as a primary error.

The tests cover cancellation ownership, the pre-registration race, session cleanup, genuine query cancellation, and a deterministic in-flight remote reader reproduction.

StopSending is a normal downstream early-stop signal. Keep query cancellation owned by the query context and cancel only the registered remote pipeline tree.

Fixes matrixorigin#27261
@aptend
aptend force-pushed the fix/27261-pipeline-local-stop branch from 08085e1 to ec5382a Compare August 21, 2026 11:10
@matrix-meow matrix-meow added the size/M Denotes a PR that changes [100,499] lines label Aug 21, 2026
@mergify mergify Bot added the kind/bug Something isn't working label Aug 21, 2026
@aptend
aptend marked this pull request as ready for review August 21, 2026 14:46
@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 →

@mergify mergify Bot added the queued label Aug 21, 2026
@mergify

mergify Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-08-21 15:49 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-08-21 17:31 UTC · at 970a20ee706661065fefbd718c92d098e7651a5c · squash

This pull request spent 1 hour 42 minutes 2 seconds in the queue, including 1 hour 29 minutes 40 seconds running CI.

Required conditions to merge
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection]
  • 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
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)

@mergify
mergify Bot merged commit a2d7e2c into matrixorigin:main Aug 21, 2026
26 of 27 checks passed
@mergify mergify Bot removed the queued label Aug 21, 2026
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…rixorigin#27458)

`StopSending` is a normal downstream early-stop signal, but the remote pipeline registry stored the query cancel function. When a LIMIT finished while a remote reader was still in flight, this canceled the remote query context and leaked `context canceled` from the query.

This change stores the root remote pipeline cancel function instead, so StopSending, pre-registration tombstones, and session cleanup stop only that pipeline tree. It also removes the broad remote-cancellation suppression and restores genuine remote query cancellation as a primary error.

The tests cover cancellation ownership, the pre-registration race, session cleanup, genuine query cancellation, and a deterministic in-flight remote reader reproduction.

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

`StopSending` is a normal downstream early-stop signal, but the remote pipeline registry stored the query cancel function. When a LIMIT finished while a remote reader was still in flight, this canceled the remote query context and leaked `context canceled` from the query.

This change stores the root remote pipeline cancel function instead, so StopSending, pre-registration tombstones, and session cleanup stop only that pipeline tree. It also removes the broad remote-cancellation suppression and restores genuine remote query cancellation as a primary error.

The tests cover cancellation ownership, the pre-registration race, session cleanup, genuine query cancellation, and a deterministic in-flight remote reader reproduction.

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

`StopSending` is a normal downstream early-stop signal, but the remote pipeline registry stored the query cancel function. When a LIMIT finished while a remote reader was still in flight, this canceled the remote query context and leaked `context canceled` from the query.

This change stores the root remote pipeline cancel function instead, so StopSending, pre-registration tombstones, and session cleanup stop only that pipeline tree. It also removes the broad remote-cancellation suppression and restores genuine remote query cancellation as a primary error.

The tests cover cancellation ownership, the pre-registration race, session cleanup, genuine query cancellation, and a deterministic in-flight remote reader reproduction.

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/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IVF CREATE INDEX 第 3 个被 context canceled,导致后续 fulltext index 未创建,ANLI nqft/qft 99% 失败

3 participants