Repository navigation
fix(sql): harden remote scheduling failure paths - #25492
Merged
XuPeng-SH merged 9 commits intoJul 6, 2026
Merged
Conversation
XuPeng-SH
requested review from
aunjgr,
gouhongshen and
ouyuanning
as code owners
July 6, 2026 15:07
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? |
2 tasks done
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [x] BUG - [x] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25451 ## What this PR does / why we need it: - remove compile-time CN ping filtering and rely on cluster-service work-state discovery - keep AP multi-CN scans local when CN candidates are empty - harden remote run stream setup, cleanup, and session-close handling - add unhappy-path coverage for remote sender cancellation, stream close, and CN work-state discovery ## Tests - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go build -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" ./pkg/sql/schedule ./pkg/sql/colexec ./pkg/sql/compile ./pkg/vm/engine/disttae - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go vet -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" ./pkg/sql/schedule ./pkg/sql/colexec ./pkg/sql/compile ./pkg/vm/engine/disttae - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go test -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" -count=1 -timeout 240s ./pkg/sql/schedule ./pkg/sql/colexec ./pkg/sql/compile ./pkg/vm/engine/disttae - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go test -race -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" -count=1 -timeout=240s -run 'Test(MessageSenderSendPipelineReturnsWhenSendObservesContextCancel|MessageSenderOnClientReceiveBatchReturnsStreamClosed|MessageSenderOnClientReceiveBatchContextDone|ReceiveMsgAndForward|ReceiveMessageFromCnServerIfConnector)' ./pkg/sql/compile --------- 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
## What type of PR is this? - [x] BUG - [x] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25451 ## What this PR does / why we need it: - remove compile-time CN ping filtering and rely on cluster-service work-state discovery - keep AP multi-CN scans local when CN candidates are empty - harden remote run stream setup, cleanup, and session-close handling - add unhappy-path coverage for remote sender cancellation, stream close, and CN work-state discovery ## Tests - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go build -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" ./pkg/sql/schedule ./pkg/sql/colexec ./pkg/sql/compile ./pkg/vm/engine/disttae - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go vet -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" ./pkg/sql/schedule ./pkg/sql/colexec ./pkg/sql/compile ./pkg/vm/engine/disttae - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go test -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" -count=1 -timeout 240s ./pkg/sql/schedule ./pkg/sql/colexec ./pkg/sql/compile ./pkg/vm/engine/disttae - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go test -race -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" -count=1 -timeout=240s -run 'Test(MessageSenderSendPipelineReturnsWhenSendObservesContextCancel|MessageSenderOnClientReceiveBatchReturnsStreamClosed|MessageSenderOnClientReceiveBatchContextDone|ReceiveMsgAndForward|ReceiveMessageFromCnServerIfConnector)' ./pkg/sql/compile --------- 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
## What type of PR is this? - [x] BUG - [x] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25451 ## What this PR does / why we need it: - remove compile-time CN ping filtering and rely on cluster-service work-state discovery - keep AP multi-CN scans local when CN candidates are empty - harden remote run stream setup, cleanup, and session-close handling - add unhappy-path coverage for remote sender cancellation, stream close, and CN work-state discovery ## Tests - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go build -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" ./pkg/sql/schedule ./pkg/sql/colexec ./pkg/sql/compile ./pkg/vm/engine/disttae - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go vet -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" ./pkg/sql/schedule ./pkg/sql/colexec ./pkg/sql/compile ./pkg/vm/engine/disttae - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go test -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" -count=1 -timeout 240s ./pkg/sql/schedule ./pkg/sql/colexec ./pkg/sql/compile ./pkg/vm/engine/disttae - GOFLAGS=-mod=mod CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib -lusearch_c" LD_LIBRARY_PATH="$(pwd)/cgo:$(pwd)/thirdparties/install/lib" go test -race -ldflags="-extldflags '-L$(pwd)/cgo -lmo -L$(pwd)/thirdparties/install/lib -Wl,-rpath,\\$ORIGIN/lib'" -count=1 -timeout=240s -run 'Test(MessageSenderSendPipelineReturnsWhenSendObservesContextCancel|MessageSenderOnClientReceiveBatchReturnsStreamClosed|MessageSenderOnClientReceiveBatchContextDone|ReceiveMsgAndForward|ReceiveMessageFromCnServerIfConnector)' ./pkg/sql/compile --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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 #25451
What this PR does / why we need it:
Tests