Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues. Searches for the exact test,
account_restore_removes_current_membership, and role/grant/restore flakiness found no matching tracking issue. [Bug]: RESTORE ACCOUNT fails on legacy CHECK metadata and drops table privileges #29399 is closed. [Bug]: Account PITR intermittently leaves prepared DELETE authorized in UT coverage #30273 is also closed and concerns the opposite assertion (a prepared DELETE remains authorized after PITR), not this failure to observe a fresh role grant before snapshot restore.
Branch Name
4.2-dev, observed in PR #32232 (issue-32214-4.2-dev).
Commit ID
f7364230dbc7f1714dda03a78bee923a5c77e9cd; comparison base 02fcfbc898f595b4f8eeb3545c6970e6d3711e85.
Other Environment Information
- GitHub Actions: Linux/amd64, Go 1.26.4, CGo, ordinary UT race lane (
-short -tags matrixone_test -race). - Workflow run: https://github.com/matrixorigin/matrixone/actions/runs/42159933022
- Failed UT job: https://github.com/matrixorigin/matrixone/actions/runs/42159933022/job/127702999557
- Local comparison: Darwin/arm64, Go 1.26.4, repository CGo wrapper. Local passes do not exclude Linux/race/scheduling-dependent behavior.
Actual Behavior
The UT job's only reported failing leaf is:
TestIssue29399AuthorizationScopeAndRevokedRole/account_restore_removes_current_membership
pkg/tests/issues/issue_29399_test.go:523
Error 20101 (HY000): internal error: do not have privilege: active role is no longer granted to the user
This assertion is before RESTORE ACCOUNT: the test revokes reader from u, creates an account snapshot, grants reader back through CN0, then immediately re-executes an existing binary prepared SELECT through CN1. The SELECT unexpectedly reports that the active role is no longer granted. The failure was emitted at 2026-11-06 04:33:53 UTC; the job collected its report at 04:44:12 UTC.
This is an unresolved cross-CN role-visibility/authorization assertion, not a coverage threshold, compiler, lint, timeout, or established infrastructure failure. The surrounding transfer-page cross-device-rename warnings have not been shown to cause this assertion.
Expected Behavior
After the role grant is committed and visible to the consuming CN, the prepared SELECT succeeds. After account restore removes that membership, the same prepared SELECT is denied; its later re-grant control succeeds. If visibility synchronization is part of the test contract, use an observable commit barrier rather than weakening authorization assertions or adding sleeps.
Steps to Reproduce
Run the linked Linux UT job or focus this exact subtest in the repository's matching CGo environment:
GOTOOLCHAIN=go1.26.4 .agents/skills/mo-dev/scripts/mo-cgo-test \
-short -tags matrixone_test -race -count=1 -timeout=5m \
-run '^TestIssue29399AuthorizationScopeAndRevokedRole$/^account_restore_removes_current_membership$' \
./pkg/tests/issuesThe failure is intermittent/not yet locally reproduced. The parent test setup creates the two-CN account/roles and retained prepared statement; running only arbitrary statements without that setup is not equivalent.
Additional information
The CDC PR changes only CDC error classification, target execution/recovery, batch ownership counts, and CDC pipeline-admission error persistence. The failing authorization/restore implementation and test are unchanged; this test does not create a CDC task. No causal path from the changed CDC functions to this role-grant/SELECT boundary has been identified. This is tracked independently instead of changing unrelated security logic in the CDC PR.
Initial local normal-mode comparisons both passed: the exact candidate and an overlay replacing all six production files changed by the PR with the verified base's contents. Test source, Go toolchain, and native inputs were unchanged in that comparison. These passes are not proof that the CI failure is pre-existing or fixed; the same failing signature has not been reproduced on the baseline.
Matching local -short -tags matrixone_test -race comparisons also passed (candidate package 60.708s; base-production overlay package 24.476s), with the named leaf selected and no failed tests in either run. The base overlay removes every PR production hunk; package-local CDC/frontend/embed test additions are not compiled as dependency tests. This is a source-isolated comparison, not a full clean-baseline Linux CI reproduction.
The same failure has not been reproduced on the baseline, so a pre-existing defect is not proven. There is no established CDC causal path and no justification to weaken or modify this security assertion in the CDC PR. Track this independent CI failure candidate here and request one rerun of the failed UT job; preserve a repeated failure signature rather than rerunning indefinitely.
Activity
[4.2] Stabilize index cache retries and CI tests (#32354)
Stabilize native CI runners and WAL replay checkpoint test (#32353)
[4.2] Fix flaky spill pipeline reset test (#32439)
[4.2] Fix flaky spill pipeline reset test (matrixorigin#32439)