Skip to content

fix(frontend): sync global sysvar commits across CNs - #26832

Draft
ck89119 wants to merge 14 commits into
matrixorigin:mainfrom
ck89119:issue-26793-main
Draft

fix(frontend): sync global sysvar commits across CNs#26832
ck89119 wants to merge 14 commits into
matrixorigin:mainfrom
ck89119:issue-26793-main

Conversation

@ck89119

@ck89119 ck89119 commented Aug 9, 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 #26793

What this PR does / why we need it:

SET GLOBAL commits the compatibility-mode row on the serving CN, but a new session routed through Proxy to another CN can still start from an older transaction snapshot and read the previous value.

This change synchronizes the latest committed timestamp to every routable CN before SET GLOBAL reports success. It reuses the existing SyncCommit query-service protocol, bounds the synchronization with a timeout, and returns partial CN failures instead of silently accepting stale cross-CN visibility.

The regression tests cover timestamp propagation, response release, waiting for all CNs, partial failures, missing/unroutable dependencies, and empty commit timestamps.

Testing:

  • go test ./pkg/frontend
  • go test -race ./pkg/frontend
  • Each new and directly related existing test with -race -count=100
  • go build -mod=readonly ./pkg/frontend
  • go vet -mod=readonly ./pkg/frontend

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/XL Denotes a PR that changes [1000, 1999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Proxy BVT can read stale lower_case_table_names on a new CN session

2 participants