Repository navigation
fix: isolate colexec server by CN service - #25682
Merged
XuPeng-SH merged 5 commits intoJul 14, 2026
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? |
1 task done
TestDeleteS3SimpleTable panicked with 'colexec server is not initialized for CN' because the per-CN colexec server isolation (introduced in this PR) requires each test to explicitly create a server for its service. Add colexec.NewServer(proc.GetService()) in prepareTestCtx, matching the pattern used by other test packages. Co-Authored-By: Claude <[email protected]>
1 task 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 ## What this PR does / why we need it `colexec.Server` was a process-global singleton. Standalone Multi-CN runs multiple CN services in one process, so dispatch UUID registrations, remote pipeline state, and CN transaction segment state were shared across CNs. Cleanup from one CN could therefore remove another CN's registration and make remote notify wait until the 30-second timeout. This PR: - creates one `colexec.Server` for every CN service; - stores it in the service-scoped runtime and removes the process-global singleton; - pins dispatch registration/cleanup and remote RPC handling to the owning CN server; - scopes transaction segment tracking by CN service; - removes the hidden global fallback in segment helpers; - adds a regression test proving that the same receiver UUID can exist on two CN services and cleanup remains isolated. Related issue: matrixorigin#25211 Failure evidence and the standalone BVT reproduction are documented in [this issue comment](matrixorigin#25211 (comment)). ## Which issue(s) this PR fixes Related to matrixorigin#25211. ## Testing - `go test -count=1 -timeout 180s ./pkg/sql/colexec ./pkg/sql/colexec/dispatch ./pkg/sql/compile ./pkg/cnservice ./pkg/vm/engine/disttae` - `go test -count=1 -timeout 180s ./pkg/vm/engine/test` - `go test -race -count=1 -run '^TestServerIsIsolatedByCNService$' ./pkg/sql/colexec` - `go build ./pkg/sql/colexec/... ./pkg/sql/compile ./pkg/vm/engine/disttae ./pkg/cnservice ./pkg/vm/engine/test/testutil` - `go vet ./pkg/sql/colexec ./pkg/sql/colexec/dispatch ./pkg/sql/colexec/multi_update ./pkg/sql/compile ./pkg/vm/engine/disttae ./pkg/cnservice ./pkg/vm/engine/test/testutil` --------- Co-authored-by: Claude <[email protected]> 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? - [x] Bug ## What this PR does / why we need it `colexec.Server` was a process-global singleton. Standalone Multi-CN runs multiple CN services in one process, so dispatch UUID registrations, remote pipeline state, and CN transaction segment state were shared across CNs. Cleanup from one CN could therefore remove another CN's registration and make remote notify wait until the 30-second timeout. This PR: - creates one `colexec.Server` for every CN service; - stores it in the service-scoped runtime and removes the process-global singleton; - pins dispatch registration/cleanup and remote RPC handling to the owning CN server; - scopes transaction segment tracking by CN service; - removes the hidden global fallback in segment helpers; - adds a regression test proving that the same receiver UUID can exist on two CN services and cleanup remains isolated. Related issue: matrixorigin#25211 Failure evidence and the standalone BVT reproduction are documented in [this issue comment](matrixorigin#25211 (comment)). ## Which issue(s) this PR fixes Related to matrixorigin#25211. ## Testing - `go test -count=1 -timeout 180s ./pkg/sql/colexec ./pkg/sql/colexec/dispatch ./pkg/sql/compile ./pkg/cnservice ./pkg/vm/engine/disttae` - `go test -count=1 -timeout 180s ./pkg/vm/engine/test` - `go test -race -count=1 -run '^TestServerIsIsolatedByCNService$' ./pkg/sql/colexec` - `go build ./pkg/sql/colexec/... ./pkg/sql/compile ./pkg/vm/engine/disttae ./pkg/cnservice ./pkg/vm/engine/test/testutil` - `go vet ./pkg/sql/colexec ./pkg/sql/colexec/dispatch ./pkg/sql/colexec/multi_update ./pkg/sql/compile ./pkg/vm/engine/disttae ./pkg/cnservice ./pkg/vm/engine/test/testutil` --------- Co-authored-by: Claude <[email protected]> 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? - [x] Bug ## What this PR does / why we need it `colexec.Server` was a process-global singleton. Standalone Multi-CN runs multiple CN services in one process, so dispatch UUID registrations, remote pipeline state, and CN transaction segment state were shared across CNs. Cleanup from one CN could therefore remove another CN's registration and make remote notify wait until the 30-second timeout. This PR: - creates one `colexec.Server` for every CN service; - stores it in the service-scoped runtime and removes the process-global singleton; - pins dispatch registration/cleanup and remote RPC handling to the owning CN server; - scopes transaction segment tracking by CN service; - removes the hidden global fallback in segment helpers; - adds a regression test proving that the same receiver UUID can exist on two CN services and cleanup remains isolated. Related issue: matrixorigin#25211 Failure evidence and the standalone BVT reproduction are documented in [this issue comment](matrixorigin#25211 (comment)). ## Which issue(s) this PR fixes Related to matrixorigin#25211. ## Testing - `go test -count=1 -timeout 180s ./pkg/sql/colexec ./pkg/sql/colexec/dispatch ./pkg/sql/compile ./pkg/cnservice ./pkg/vm/engine/disttae` - `go test -count=1 -timeout 180s ./pkg/vm/engine/test` - `go test -race -count=1 -run '^TestServerIsIsolatedByCNService$' ./pkg/sql/colexec` - `go build ./pkg/sql/colexec/... ./pkg/sql/compile ./pkg/vm/engine/disttae ./pkg/cnservice ./pkg/vm/engine/test/testutil` - `go vet ./pkg/sql/colexec ./pkg/sql/colexec/dispatch ./pkg/sql/colexec/multi_update ./pkg/sql/compile ./pkg/vm/engine/disttae ./pkg/cnservice ./pkg/vm/engine/test/testutil` --------- Co-authored-by: Claude <[email protected]> Co-authored-by: XuPeng-SH <[email protected]>
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?
What this PR does / why we need it
colexec.Serverwas a process-global singleton. Standalone Multi-CN runs multiple CN services in one process, so dispatch UUID registrations, remote pipeline state, and CN transaction segment state were shared across CNs. Cleanup from one CN could therefore remove another CN's registration and make remote notify wait until the 30-second timeout.This PR:
colexec.Serverfor every CN service;Related issue: #25211
Failure evidence and the standalone BVT reproduction are documented in this issue comment.
Which issue(s) this PR fixes
Related to #25211.
Testing
go test -count=1 -timeout 180s ./pkg/sql/colexec ./pkg/sql/colexec/dispatch ./pkg/sql/compile ./pkg/cnservice ./pkg/vm/engine/disttaego test -count=1 -timeout 180s ./pkg/vm/engine/testgo test -race -count=1 -run '^TestServerIsIsolatedByCNService$' ./pkg/sql/colexecgo build ./pkg/sql/colexec/... ./pkg/sql/compile ./pkg/vm/engine/disttae ./pkg/cnservice ./pkg/vm/engine/test/testutilgo vet ./pkg/sql/colexec ./pkg/sql/colexec/dispatch ./pkg/sql/colexec/multi_update ./pkg/sql/compile ./pkg/vm/engine/disttae ./pkg/cnservice ./pkg/vm/engine/test/testutil