Skip to content

Fix/pipeline remote batch backpressure - #26711

Merged
XuPeng-SH merged 9 commits into
matrixorigin:mainfrom
jiangxinmeng1:fix/pipeline-remote-batch-backpressure
Aug 5, 2026
Merged

XuPeng-SH merged 9 commits into
matrixorigin:mainfrom
jiangxinmeng1:fix/pipeline-remote-batch-backpressure

Conversation

@jiangxinmeng1

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:

issue #25114

What this PR does / why we need it:

Fix/pipeline remote batch backpressure

@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 commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-08-05 09:59 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-08-05 10:47 UTC · at d32400ebccc6a89d647250d9d6b0822ac21d8568

This pull request spent 48 minutes 40 seconds in the queue, with no time running CI.

Reason

Pull request #26711 has been merged manually at f526bc7

Hint

You were too fast!

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

@XuPeng-SH
XuPeng-SH merged commit f526bc7 into matrixorigin:main Aug 5, 2026
24 of 26 checks passed
@mergify mergify Bot removed the queued label Aug 5, 2026
mergify Bot pushed a commit that referenced this pull request Aug 6, 2026
Remote batch backpressure records a batch as outstanding until the client sends its ACK. The connector, dispatch, and remote-notify receive loops returned before that ACK when downstream had already stopped, leaving the server drain barrier to wait for its 30-second timeout.

This change acknowledges a successfully decoded batch after it is handed off or intentionally discarded, before a graceful early return. Error and cancellation paths still return without a success ACK and rely on stream teardown, preserving the bounded-credit behavior introduced by #26711.

It also adds regression coverage for all three graceful-stop paths.

Tests:

- `go test -race -count=25` for each new/updated regression test
- `go test -race -count=1 ./pkg/sql/compile`
- `go test -count=1 ./pkg/sql/compile`
- `go test -count=1 ./pkg/sql/colexec/connector ./pkg/sql/colexec/dispatch`
- `go list`, `go build`, and `go vet` for `./pkg/sql/compile`

Approved by: @XuPeng-SH
XuPeng-SH added a commit that referenced this pull request Aug 28, 2026
## 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 #26720

## What this PR does / why we need it:

Backport the fixes missing from `4.2-dev` for
[#26720](#26720) and
  [#25114](#25114).

  Included PRs:

  - #26711: Fix pipeline remote batch backpressure
  - #26739: Retry COS multipart initialization on EOF
  - #26759: Fix IVF prefilter OOM
  - #26989: Reduce IVF prefilter scan memory copies
  - #27156: Keep connections alive after long-running requests

The changes address vector-index memory usage, file-service retry
behavior, remote pipeline backpressure, and
  frontend connection lifecycle on `4.2-dev`.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: XuPeng-SH <[email protected]>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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#25114

## What this PR does / why we need it:

Fix/pipeline remote batch backpressure

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
Remote batch backpressure records a batch as outstanding until the client sends its ACK. The connector, dispatch, and remote-notify receive loops returned before that ACK when downstream had already stopped, leaving the server drain barrier to wait for its 30-second timeout.

This change acknowledges a successfully decoded batch after it is handed off or intentionally discarded, before a graceful early return. Error and cancellation paths still return without a success ACK and rely on stream teardown, preserving the bounded-credit behavior introduced by matrixorigin#26711.

It also adds regression coverage for all three graceful-stop paths.

Tests:

- `go test -race -count=25` for each new/updated regression test
- `go test -race -count=1 ./pkg/sql/compile`
- `go test -count=1 ./pkg/sql/compile`
- `go test -count=1 ./pkg/sql/colexec/connector ./pkg/sql/colexec/dispatch`
- `go list`, `go build`, and `go vet` for `./pkg/sql/compile`

Approved by: @XuPeng-SH
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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#25114

## What this PR does / why we need it:

Fix/pipeline remote batch backpressure

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
Remote batch backpressure records a batch as outstanding until the client sends its ACK. The connector, dispatch, and remote-notify receive loops returned before that ACK when downstream had already stopped, leaving the server drain barrier to wait for its 30-second timeout.

This change acknowledges a successfully decoded batch after it is handed off or intentionally discarded, before a graceful early return. Error and cancellation paths still return without a success ACK and rely on stream teardown, preserving the bounded-credit behavior introduced by matrixorigin#26711.

It also adds regression coverage for all three graceful-stop paths.

Tests:

- `go test -race -count=25` for each new/updated regression test
- `go test -race -count=1 ./pkg/sql/compile`
- `go test -count=1 ./pkg/sql/compile`
- `go test -count=1 ./pkg/sql/colexec/connector ./pkg/sql/colexec/dispatch`
- `go list`, `go build`, and `go vet` for `./pkg/sql/compile`

Approved by: @XuPeng-SH
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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#25114

## What this PR does / why we need it:

Fix/pipeline remote batch backpressure

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
Remote batch backpressure records a batch as outstanding until the client sends its ACK. The connector, dispatch, and remote-notify receive loops returned before that ACK when downstream had already stopped, leaving the server drain barrier to wait for its 30-second timeout.

This change acknowledges a successfully decoded batch after it is handed off or intentionally discarded, before a graceful early return. Error and cancellation paths still return without a success ACK and rely on stream teardown, preserving the bounded-credit behavior introduced by matrixorigin#26711.

It also adds regression coverage for all three graceful-stop paths.

Tests:

- `go test -race -count=25` for each new/updated regression test
- `go test -race -count=1 ./pkg/sql/compile`
- `go test -count=1 ./pkg/sql/compile`
- `go test -count=1 ./pkg/sql/colexec/connector ./pkg/sql/colexec/dispatch`
- `go list`, `go build`, and `go vet` for `./pkg/sql/compile`

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/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants