Repository navigation
fix(iscp): preserve fresh init jobs and shorten embedded test waits - #31237
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? |
|
mo-bot review · Commit: "interrupted" |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review of d3f7cf6 against 83c1e23: no blocking findings.
The fix belongs in the existing registration transaction: a newly persisted InitSQL generation carries the existing atomic-protocol marker before startup recovery can classify it. It does not mark initialization complete. InitSQL and the Running transition still commit together; status updates preserve the marker, CAS/generation fencing remains intact, and ambiguous unversioned legacy Init rows remain quarantined. No duplicate lifecycle or execution path is introduced.
The one-second discovery/watermark defaults are confined to WithTesting, preserve explicit settings and subsequent WithPreStart overrides, and leave production defaults unchanged. The production change adds one registration-time field assignment, not per-row/TP work. Maintained delta: production assignment +3 lines including explanation, test timing infrastructure +9, tests net +30, existing comments updated; no new evidence/document files.
Independent local validation on macOS arm64 / Go 1.27.1, after building this revision's native libraries:
- Entire pkg/iscp with -race -count=1: 192 top-level tests / 322 passing test nodes, exit 0 (10.773s), including recovery, cancellation, rollback, CAS loss and legacy quarantine.
- Changed embed configuration tests with -race: pass, including testing/non-testing defaults and overrides.
- Real two-CN TestIssue29699DropImmediatelyAfterAsyncIndexCreate and TestDropAccountDuringAsyncIndexInit with -race: pass (7.46s and 12.61s).
- Negative control using a Go overlay removing only the new registration assignment: the real clone test fails at the new durable-state assertion, expected 1 / actual 0, in 8.65s; fixture cleanup completes. The reviewed tree remains unchanged.
- Formatting and diff checks pass. No existing review threads were present at recheck.
Shared-build CI has passed; full remote UT/SCA/coverage are still running at review time. This is a code-review conclusion, not a claim that full CI is green. Submitting COMMENT because the authenticated account is also the PR author.
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: d3f7cf6a45c8f9257a6a505de53f2e064a7dd6c6
Assessment: approve
Reviewed all seven changed files and their callers. Registration records atomic-initialization provenance through the existing transaction owner while preserving legacy quarantine and drop fencing. Test cadence changes preserve explicit settings and production defaults. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
Validation:
-
Verified frozen source, patch, formatting, clean checkout and compatible native provenance. Commands, fingerprints, receipts and logs are reconciled in /home/xupeng/.local/state/mo-bot/jobs/6d89c50e0d0d2b9ee1c23a7c/attempt-1/validation-audit.json.
-
Complete ISCP and multicn suites passed normally and under race: 350 test/subtest results per mode. Recovery passed 100 race repetitions; initialization/account-drop passed two further race repetitions.
-
A control removing only the registration change failed the new durable assertion: expected one marked job, observed zero. The fixed head passed.
-
Complete embed race selection: 144 roots passed, two existing skips, 605 passing test/subtest results across four groups. Verified and reused 100 race repetitions of each unchanged configuration test.
-
Repository-configured static analysis passed for embed, iscp and multicn with zero reported issues.
-
Verified prior cadence-only comparison: the async SQL case decreased from 101.95s to 33.77s, with 28.81s confirmation. Registration adds no query or transaction.
Limitations:
-
Full current-head CI, including coverage, remained pending. Author claims about 505-package coverage were not counted as independently verified execution.
-
Embed race tests ran in separate groups because the executor caps each binary at 600s; cumulative single-process execution was not verified. Existing skips: TestCDCMySQL8TargetIdentityBVT and TestRestartCN.
-
The timing comparison predates the registration fix and establishes neither whole-CI savings nor CPU/memory reductions. Faster test polling increases catalog-check frequency.
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [x] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to #23010 (closed as not_planned) and the SOUNDS LIKE subitem of #24496. ROW constructors and issue closure are outside this PR. ## What this PR does / why we need it: `SELECT 'Hello' SOUNDS LIKE 'Hallo'` previously failed to parse. Lower the predicate to ordinary `SOUNDEX(left) = SOUNDEX(right)`, using each operand once and retaining existing SOUNDEX type, NULL, binary/text and prepared-parameter behavior. Preserve non-reserved identifiers/implicit aliases and ordinary LIKE. Contextual lookahead uses the authoritative scanner on a copy, including executable comments, with a recursion guard. No new executor, function ID, JSON-to-SOUNDEX change from #30883, or ROW constructor implementation is included. ### Current integration and validation Head `2a3ab5d549805a4cefa1b860b81d9742c2206ac2` normally merges main `00c103b68bd2b39194147508445956f5ece16dda` into `234270c60a57ad93bc47f7b15de6cea3ed2ebe43`; no rebase or force update. The generated parser was the sole conflict and was regenerated from merged grammar, preserving main's JSON_TABLE charset changes and the SOUNDS predicate. Independent AI source review of the exact integrated feature delta found no blocking issue; this is not a maintainer approval or reviewer test rerun. Fresh validation on this head, Linux amd64 / Go 1.27.1, repository native test wrapper: - Forced parser generation: zero conflicts, all 780 existing main token constants unchanged. Complete MySQL parser and facade packages passed with `-count=1`, covering executable comments, aliases, ordinary LIKE, typed nesting, marker order, HIGH_NOT_PRECEDENCE and format/reparse. Scoped vet, configured incremental lint (0 issues), formatting/diff checks passed. - Full `make build NATIVE_BUILD_JOBS=4` passed, binary embeds `2a3ab5d54`. On its fresh SQL/ISCP-ready owned instance, normal mo-tester Soundex/SOUNDS LIKE BVT passed **122/122 twice**, no failed/ignored/abnormal statements. True/false/NULL independent oracles, expressions, prepared reuse, WHERE/CASE, CTAS and canonical view replay are covered. Terminal table/view and probe-schema residue checks were zero. - Real COM_STMT_PREPARE/EXECUTE reuse passed text, NULL, UTF-8 string, numeric type changes and trailing markers, with explicit SOUNDEX equality control and explicit binary-cast control. SHOW CREATE VIEW original-text and information_schema canonical-definition export/replay both passed. - The previously failing `TestDropAccountDuringAsyncIndexInit` passed fresh under **coverage mode** (6.78s test / 7.478s package), including durable registration, held initializer, real DROP rollback and cleanup assertions. Used the same pinned CI helper's 505-test-package / 484-instrumented-package selection, `-short -tags matrixone_test -covermode=set -count=1`, selecting this one test with local `-p 2` and admission pool 2. This is targeted coverage qualification, not the entire hosted 505-package `-p 8` run or a race result. ### Prior CI failure and baseline repair Old head `e1c1311f...` passed hosted required CI run 40441990982; identity-only successor `234270c...` failed coverage job [122118653081](https://github.com/matrixorigin/matrixone/actions/runs/40483078946/job/122118653081) at `async_index_drop_test.go:212`: initializer not observed before the context deadline. No blind rerun was requested. The old baseline lacks upstream [#31237](#31237), already merged as `fe4fc722a2f932d91ed86d3ef9d20f8a689e7cda`. Main refresh brings its registration-side lifecycle marker and existing durable regression, rather than adding a separate ISCP fix. A diagnostic-only local A/B proved missing registration provenance (expected 1, actual 0) and the upstream marker correction passed the complete test. The original failed CI's actual quarantine event has **not** been verified; selected original events establish the timeout before DROP/cleanup, not that historical scheduling interleaving. New-head hosted CI remains separately pending and is not inferred from prior runs or local coverage success. ### Compatibility and remaining limits SHOW CREATE VIEW retains original SOUNDS LIKE text; information_schema VIEW_DEFINITION formats explicit SOUNDEX equality. Before an old-binary rollback, rewrite/remove new-syntax views and application/prepared SQL. No released-binary upgrade, mixed-version execution or deployed QA result is claimed. The first local attempt to reopen an older temporary data root failed with `shard not bootstrapped`; it was preserved and a fresh isolated data root was used for the passing SQL qualification. This is not an upgrade pass. Versioned D1 design received independent AI technical approval at its original revision; the implementation and executable-comment correction received independent AI technical acceptance, followed by this merge-delta source review. GitHub commit attribution has been corrected and CLAassistant reported all committers signed. Ready requests formal upstream review, not merge, auto-merge, deployment, permission expansion or issue closure.
## What type of PR is this? - [ ] API-change - [x] BUG - [x] Improvement - [x] Documentation - [ ] Feature - [x] Test and CI - [x] Code Refactoring ## Which issue(s) this PR fixes: Fixes #32288 Fixes #32297 Fixes #32298 Fixes #32321 Fixes #32260 Related to #32278. The separate view-refresh work in #29433 remains open. ## What this PR does / why we need it: Support a stopped 4.2 release upgraded directly to current main, including its existing data and snapshots. * Move historical orphan-grant cleanup into the existing 4.0.7 tenant upgrade and current system-view publication into the existing startup/admission owner. Remove the recurring per-CN repair loops. Current create, drop and restore paths retain their own catalog responsibilities. * Preserve the current physical-index filtering from main in TABLES, COLUMNS and PARTITIONS. The startup completion check includes PARTITIONS, so a missing or outdated system definition reaches the existing admission-gated reconciliation; the current state remains read-only and failures prevent ingress. * Stop creating retired transaction-trace tables on fresh clusters. Preserve existing 4.2 trace tables, data, protections and frozen historical upgrade entries. * Add a read-only 4.2 preflight for ambiguous snapshot ownership and CDC task inventory. Preserve explicit administrator decisions, exact-preimage checks and the CDC rejection when safe resumption cannot be established. Cancellation joins the tracked direct child, including the launch-to-PID-registration window; a winning atomic publication remains a complete file. * Read snapshot catalog rows in pages of 32 instead of 128 to fit legal wide names within the existing 4 MiB result limit. Decision-write and diagnostic batches remain 128. This can require roughly four times as many one-time page reads; it does not bound total engine memory. Repair the CI tests at their actual synchronization and ownership boundaries: * Install each proxy Unlock fault injector before publishing its route. Keep the delegate immutable while synchronized controls simulate lost requests/responses; retain all five real-owner handoff/retry scenarios and exercise concurrent keeper-style bind reads. * Reuse the existing short-test heartbeat configuration for 13 rolling-restart scenarios and replace 11 busy-spins with waits on the original caller context. Production timing, allocator grace, error/state assertions and the fast negative restart case are preserved. * Join the pending-GC worker before asserting its final queue; retain both real batch ladders and prove the autonomous scheduler tick with controlled test-local file-service gates. * Fence the transfer test's pooled read after its successful commit. Identify CAS writers through their real SQL session and active transaction, with an unrelated transaction held as a control. Preserve affected-row, isolation, conflict and final-data assertions. * Replace CHECK's unrelated global allocator-zero precondition with the commit barrier. Keep a synthetic historical orphan present throughout the existing public CHECK cases to exercise that boundary. * Give Unicode scenario groups and independent cleanup operations bounded contexts. Start account workload timing after initial cleanup. Separate Scalar setup and concurrency exercise into fixed 60-second phases. This increases aggregate allowances; deadlines are never renewed within a running operation. * Give privilege-cache and Scalar child cases their own shared-fixture failure ownership. Cancel and join SQL actors before teardown, report cleanup errors, discard uncertain transaction connections and quarantine failed generations before the next case. * Consolidate final Scalar system-database cleanup at the group boundary while retaining each child's reset and failure ownership, all 16 semantic modes, and warm shared-cluster reuse. The full successful matrix issues 36 explicit source/peer DROP DATABASE calls instead of 64; the removed calls are normally redundant absent-database drops, not eliminated required teardown or measured WAL writes. Tenant source/account cleanup keeps its original 10/20-second limits. * Final system-database cleanup now uses independent 60-second budgets, matching the existing Scalar setup phase, instead of 10 seconds each: the final pair can consume at most 120 rather than 20 seconds. The next child's unchanged 60-second setup now owns the preceding nonempty database reset. Unknown or failed DROP results remain errors and quarantine the fixture; no destructive DDL is retried. This test policy does not fix the runner's storage latency or prove the historical timed-out request would finish within 60 seconds. * Retain LIKE's matching throwing-residual, disjoint nonthrowing control and planner guards, independently of statistics-driven predicate order. ### Validation * Rebased on main `bfbb2645c034` (includes #32032). Incremental gofmt, tagged vet, pinned molint and golangci-lint passed across all 13 changed Go owners and the directly affected v1.2.0 upgrade package. Complete `pkg/bootstrap` and `pkg/util/sysview` race runs passed (84 and 43 top-level tests). Focused race exercises stale, missing and failed PARTITIONS checks, CN admission/ingress failure, current metadata and the frozen release PARTITIONS definition. * On a real local catalog, a fresh current PARTITIONS definition passed the completion check; installing the released 4.2.8 definition made it incomplete, and the existing startup owner replaced it once and left a second reconciliation as a no-op. The existing hidden-index access and tenant-upgrade SQL cases passed in normal and race modes; they exercise renamed backing indexes and TABLES/COLUMNS/PARTITIONS visibility. The Scalar cleanup root and all 16 scenarios passed race after rebase. * A fresh stopped 4.2.5 single-CN, two-tenant upgrade and clean restart passed with the rebuilt rebased binary. System and both tenant TABLES/COLUMNS/PARTITIONS definitions used the current physical-index predicate, ordinary indexed tables remained visible and backing index relations were hidden. Tenant identities, live rows and grants survived, orphan grants disappeared, recreated tables inherited no stale access, and decimal/bit/varchar defaults and values matched. This is a local single-CN result; its empty read-only cgroup mount does not validate cgroup monitoring. * The rebased `pkg/vm/engine/disttae` race run passed 734 top-level tests, including the PR's GC worker case after its interaction with #32032; the v4.0.6 owner passed five. `pkg/txn/trace` has no direct test files. The following broader validation was performed before rebasing onto #32032; it is retained with its original scope and is not a claim that the same full suites were rerun at the rebased head: * Complete lockservice normal and race runs each passed the same 690 named tests with no skips. Matched local race package time fell from 58.668 to 42.592 seconds (27.4%); the 13 rolling-restart bodies fell from 20.15 to 4.23 seconds. This is a local package measurement, not an end-to-end CI speedup. All 19 selected controls passed with coverage; all 14 rolling-restart controls also passed without short mode. * A controlled reintroduction of the live proxy-interface write made the original issue-named test fail under the race detector. Joining the keeper before canceling a pending restart made the context wait fail explicitly. Both are deliberate negative controls, not ordinary passing tests. All 18 measured-budget exact-test race stress commands passed (1,597 repetitions; each command selected one exact root). * Before this rebase, gofmt, diff checks, tagged vet and pinned selected-owner molint and golangci-lint passed across the 13 changed Go owner packages. * Complete `pkg/tests/sqlintegration` race: 104 top-level passes and one existing external-service skip. Complete `pkg/embed` race: 159 passes and two existing skips. The embed run includes the CI-named DataBranch case, failed-fixture controls and system/tenant predecessor-to-current COLUMNS crossing with restart. * All selected issues tests passed normal and race, including all 16 Scalar modes, both account roots, Unicode, AutoID and cleanup error/budget controls. Complete `pkg/bootstrap/versions`, `pkg/bootstrap/versions/v4_0_7` and `pkg/util/sysview` race runs passed. * Final-source fault injection validated GC worker joins at both gates, privilege and Scalar failed-generation isolation, continuation after canceled AutoID rollback, account workload context ownership, and a controlled stale transfer read followed by the actual fence and correct pooled result. Injected failures remained test failures; they were not counted as passing normal cases. * A fresh released 4.2.5 single-CN, two-tenant stopped upgrade and clean restart passed using the rebuilt production-identical binary. Live IDs/grants and restricted-user reads survived, real orphan grants disappeared, recreated tables inherited no stale grant, and persisted decimal/bit/varchar defaults matched the new COLUMNS definition and stored data before and after restart. The release harness used an empty read-only cgroup mount; cgroup monitoring was not validated. * Earlier unchanged preflight evidence includes all 11 tests, deterministic cancellation timing and 20 repeated signal tests, plus Bash syntax, ShellCheck and Ruff checks. * Focused CAS/LIKE and CHECK/privilege normal tests passed. Measured-budget race repetitions passed for the exact affected roots: GC 3, SI 5, reverse/restart 3, transfer 4, pessimistic RC 5, LIKE 3, Unicode 6, AutoID 2, concurrent-account 4, refresh-account 5 and privilege 3. Other affected roots had N=1 from their measured duration and reuse their completed race results. * Scalar cleanup repair: normal and race passed all 16 original modes plus a real next shared-fixture consumer. Two matched-configuration race samples of the three-root group were 37.319/35.513 seconds before and 37.069/37.607 seconds after; no material local cost change was observed, and this is not a CI speedup claim. Four fake-clock cleanup cases passed, including 100 race repetitions. A controlled 20-second success fails with the old 10-second budget and succeeds with the selected policy; real-fixture probes cover an unselected root, tenant namespace ownership, system finalization, child failure, and final DROP errors before/after effects, preserving errors, independent cleanup and generation quarantine. * Independent `gpt-6.1-terra` / `max` design and final overall reviews passed for the complete PR, with the current rebase resolution and affected evidence reviewed alongside the previously reviewed unchanged closures. Earlier author-reported validation used released 4.2.8 with historical snapshots/trace tables and 129 legal wide snapshots, including upgrade, interrupted recovery and restart. The author also reported 21 affected SQL/BVT scripts with 4,382 passes and 8 existing ignores. Those are historical reports, not fresh executions of this revision. Earlier CI covered all 20 changed result-file companion cases with zero failed/abnormal results and 8 existing ignores, before the latest main merges. The supported transition excludes mixed-version operation, downgrade and upgrades from unreleased main catalogs. Preflight requires a MySQL-compatible client, jq, GNU coreutils and scratch disk proportional to the catalog, with source snapshot/branch writers drained. System-account and cluster snapshot/PITR restores with the incompatible old CDC watermark schema still fail before mutation. Production-scale memory and a real release-source multi-CN upgrade have not been measured. Assigned-issue audit: #31239 was independently verified as already fixed by merged #31237. Historical #30985 and #29333 were closed as not planned because essential incident evidence is unavailable; no causal fix is claimed. The production COPY ALTER/HNSW concurrency issue #31611 remains open; this PR preserves its conflict protection. The CI HAKeeper ReadIndex startup stalls and internal Scalar ALTER latency remain unexplained. These test fixes do not establish either primary liveness cause as resolved. CI on the rebased revision is pending.
## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [x] Documentation - [x] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to issue #30467. Parent tracker #30464 and other account-management features remain outside this change; no issue is closed by this PR. ## What this PR does / why we need it: `RENAME USER old TO new` currently fails to parse, so account-renaming scripts cannot preserve existing credentials and grants. Add ordered, atomic rename pairs that retain the stable user ID, credentials, grants, default role and owned objects. Renaming the first source is rolled back if a later pair fails. Use stable IDs for affected authentication/session consumers and revalidate user bindings under the shared user-row exclusion. Reject protected/admin/special identities and textual function/procedure DEFINER references. Routine create/replace persists the post-lock canonical creator name. Routine-bearing CLONE requires an actual pessimistic-RC transaction and fails before target creation otherwise; no-routine CLONE keeps its prior behavior. MatrixOne still has one username identity independent of host. Omitted/`%` hosts preserve the stored host; explicit hosts must match. New destination names reject the specifically demonstrated login/SQL ambiguities (ASCII space/tab, backtick, quotes, backslash, question mark, NUL and exact uppercase `%3A`) after existing normalization. Unicode and other accepted controls remain supported; addressable legacy source names can migrate out. This is bounded compatibility, not the full MySQL host/name grammar. **Operational contract:** drain traffic and SQL/task writers, fully replace participating CNs and complete identical authoritative special-task bootstrap on every CN before admitting rename traffic. Restore must exclude affected-account writers. Mixed-version serving, rolling upgrade and online downgrade are unsupported. Design: [identity-preserving rename contract](https://github.com/matrixorigin/matrixone/blob/823dc248403520744a6ea9d777cc065fe43910ff/docs/design/20261026-rename-user.md) · [operational reference](https://github.com/matrixorigin/matrixone/blob/823dc248403520744a6ea9d777cc065fe43910ff/docs/reference/rename-user.md). ### PROXY BVT unordered SHOW GRANTS comparison correction The PROXY job in CI run [40861917012](https://github.com/matrixorigin/matrixone/actions/runs/40861917012/job/123411644943) failed 9 of 66 assertions on `rename_user.sql`. All nine actual grant multisets (including both repeated connect grants), principal names and metadata matched; only row order differed. The fixture's explicit `@sortkey:0` selected a comparator that preserves differing keys rather than the tester's normal full-row unordered comparison. Published head `f8d6eedd97a5600b4d6e3dee4ff1059f83bbbcd2` removes the 11 inappropriate sortkey directives and adds an explanatory comment. Executable SQL, session/capture assertions and the canonical `.result` file are unchanged. No product code, ignored assertions, regex suppression or golden regeneration is involved. Fresh tests use the same official mo-tester revision `309a0ca`, on one local single-CN TCP-only instance with `nometa` and auto-reconnect disabled: - Original tagged fixture + permutation: expected 9 ordering failures, reproduced. - Corrected fixture + identical permutation: 66/66 pass. - Canonical result: 66/66 pass twice on the same instance. - Remove one duplicate connect grant from each affected expected block: expected 9 failures, verified. - Replace the principal in each affected expected block: expected 9 failures, verified. - All scenarios: zero ignored/abnormal cases; the six-scenario validation driver passes. This is a comparison-fixture fix, not a Proxy migration fix. Existing Proxy migration P1/v0.7 and the fresh-session first-request `current_user_id()` diagnostic remain open. Local comparison checks do not establish full Proxy/topology coverage; Normal fast-forward publication was verified on the fork branch and this PR. New-head CI is pending verification; no green-CI claim is made. ### Previous 4e41034 dot follow-up: SHOW GRANTS identity and main integration Published head `4e410344e7617f2a49fc8a08d652455d471d9553` has tree `166177c66dd3b5f0bab9449ba75448f64b80ec2e`, identical to tested `ec4819f58441abc619b3bc43bcfe0c58b100af44`. Only the three unpublished commits' author/committer identities were corrected to the already associated contributor identity; every intermediate tree, message, timestamp and equivalent merge-parent relationship was verified. Published history is unchanged. Normally merge main `b01e952ad1021ef8f188641f3a11a1360c001218`. Resolve ALTER USER / GRANT ROLE executor-option conflicts by retaining both stable-user pessimistic-RC locking and main's internal catalog-execution marker. Regenerate the parser from the merged grammar with zero conflicts. RENAME's own executor also uses the marker, preserving main's DCL exemption from the client READ ONLY gate without exempting ordinary persistent INSERT. Remove the frontend's conversion of implicit SHOW GRANTS to the session's stale username. Omitted/CURRENT_USER forms retain stable-ID lookup; explicit user/host and role forms remain explicit. The new real frontend regression retains the same authenticated connection across rename and old-name reuse, compares grants to an independent catalog-ID oracle, asserts old-name fresh-login rejection as MySQL 1045 / SQLSTATE 28000, and tests ordinary INSERT 1792 alongside successful RENAME in a READ ONLY session. Restoring only the removed three lines makes this real regression fail (expected renamed user's grants, actual empty result). Fresh Linux/amd64, Go 1.27.1 evidence on the identical candidate tree: - Frontend owning normal: PASS 25.021s; owning race: PASS 50.377s, 2768 passing roots and the existing `TestRuleCacheDoubleCheckLocking` skip. - Parser owning group: PASS 0.175s; tree group: PASS 0.035s. - Real `TestRenameUserShowGrants`: PASS 4.776s, task-owned single-CN TCP-only fixture. - New maintained `zz_accesscontrol/rename_user.sql/.result`: expected booleans/error classes manually reviewed, then official mo-tester normal comparison twice on the same task-owned instance, **66/66 each, zero failed/ignored/abnormal**. Runs use `nometa` and per-statement `sortkey`; they do not claim column-metadata validation. Auto-reconnect is disabled; connection-ID checks prove existing-session retention. - Five affected packages' all-vet/compile checks and formatting/diff checks passed. Configured incremental molint and golangci-lint 2.14.0 across the same five packages passed with zero issues. The first golangci process was killed (137); a bounded recovery kept all existing rules/packages, used concurrency 1 and GOMEMLIMIT=5GiB, and passed in 3m17s with peak 3581 MiB. No suppression or system setting changed. This follow-up is **not complete-PR merge approval**. Proxy migration P1 and the proposed v0.7 protocol remain unresolved; no protocol fix is included. A separate diagnostic observed `current_user_id()` returning 0 on the first request and the catalog ID on the next request, before any RENAME; this patch does not claim to fix that initial-context behavior. New SQL evidence is single-CN/TCP-only: the local Unix-socket capability probe was denied, and Unix, proxy migration, cross-CN/restart/upgrade were not rerun for this follow-up. Earlier evidence below retains its original exact-source scope, rather than being relabeled as fresh coverage. Normal fast-forward publication has been verified on both the fork branch and this PR. That head's [CI 40861917012](https://github.com/matrixorigin/matrixone/actions/runs/40861917012) subsequently reported the nine PROXY ordering failures addressed above; no green-CI or all-review-resolved claim is made. ### Previous 823dc24 main synchronization and validation Current head `823dc248403520744a6ea9d777cc065fe43910ff`, tree `620ca38269fc65111981af254d13ad486790ca31`, normally merges main `3b7752551b8a1cc60daddecde9a5438d5357cdf4` into `a3ffbf49`. Only generated `mysql_sql.go` conflicted; grammar and frontend status handling merged automatically. Official regeneration twice produced identical SHA256 `25b9822d1c97f266e4fbe6910333ce338312bbb60db41801805bf3f2246e83f4`, with zero grammar conflicts. The result equals the automatic merge tree with only the generated blob replaced. RENAME semantics remain unchanged alongside upstream SOUNDS LIKE/JSON_TABLE and ODKU behavior. Fresh exact-candidate Go 1.27.1/Darwin arm64 validation: parser owning group 368 passing roots/no test skips; frontend normal 2705 passing roots/one existing RuleCache skip; configured incremental lint across the five feature packages passed with zero issues. Tests used count=1, vet=all and p2. Native/dependency inputs are unchanged and retain verified provenance. A first lint attempt stopped at the owned 4 GiB disk guard and is retained separately from the later successful run; no denied cache deletion or security-setting change was used. Real SQL `TestRenameUserIdentity` passed (root 4.69s/package 8.089s) with an external test-only overlay: all existing RENAME ID/credentials/grants/login/ordered-rollback/guard assertions, SOUNDS LIKE positive/negative comparisons, and ODKU update returning OK insert ID 1 while preserving generated session baseline 900 and updated value 20. The overlay adds no product-tree changes; its source/diff/hashes and failed fixture attempts are retained. An initial unsupported LAST_INSERT_ID(argument) fixture failed before ODKU/RENAME; the passing fixture uses the supported zero-argument function after generating ID 900 via two seed rows. Test binary SHA256 `0c34a926d97b6d6ac1a826fa38060759af4594f0660bfcc2c33cb447de60b55a`. Cleanup passed, no owned process-group members/listeners remain. Old `a3ffbf49` Ready-event [CI 40525129669](https://github.com/matrixorigin/matrixone/actions/runs/40525129669), including Required 122297080186, completed successfully. It is not relabeled as new-head evidence. New-head [CI 40539670894](https://github.com/matrixorigin/matrixone/actions/runs/40539670894) is in progress. Fresh whole owning race, full distributed BVT and historical released-version upgrades were not rerun locally for this mechanical synchronization; earlier exact-source evidence retains its stated scope. PR remains ready for maintainer review, without merge/automerge/deployment. ### Historical validation of the initial publication - Tested product head: `38ab30c91e69699e82d1937b9d0cfdfa465770b6`, based on `83c1e23526fc0ed31188abd7fc2ca87cd3a6d4b3`. Six unpublished commits were reattributed to the authenticated user's already GitHub-associated identity, preserving every intermediate tree, commit message and timestamp. Identity-only head `ad8a63f462435fc4a9bdefa148b3daa8e5e7b54f` has the identical tested tree `ff096cdeba45f9bd6f360f4096c1b88e5e848432`. The initial publication successor `2dc7122d` added only the two maintained documentation updates; no product/test code changed in that initial identity/docs publication. The later main integration and dead-helper cleanup are recorded separately below. - Go 1.27.1. Exact-head frontend focused consumer tests, owning normal and owning `-race` passed on Linux/amd64; compile/vet and formatting/diff checks passed. Unchanged earlier parser/planner evidence is retained as historical, not relabeled as a new whole-suite run. - Darwin/arm64 real SQL: frozen embedded identity test and supplemental ID/login/grants/session, atomic pairs, destination-name, DEFINER and CLONE RR/RC checks passed. Snapshot restore before and after rename and same-version restart passed. - Deterministic real-engine interleavings: distinct operators crossed actual empty-target reads, then produced real duplicate-key error 1062 and whole-statement rollback. Ordinary-role GRANT/DROP binding revalidation and routine create/replace versus rename used real transaction locks and controlled barriers. The GRANT case does not claim administrator promotion; supported guards reject that promotion path. These engine interleavings are separate from the Go race-detector result. - Four independent OS processes (1 LOG/1 TN/2 CN): both CNs reported authoritative task-service creation and the expected commit; both authenticated the same special sentinel identity before feature SQL. Cross-CN rename/login, stable ID/credentials/grants, old session and special DEFINER/protection checks passed. All four processes exited 0 and owned listeners were released. - Fully stopped exact base→head replacement: old credentials logged into both base CNs and read granted data; all four old processes exited 0 before any head process started. The same controlled storage/UUIDs survived replacement; head repeated bootstrap admission, preserved identity/grants/data/function behavior, and passed rename/login. Head binary SHA256 `4d1cf85c4917e4463aa8f864e9eb346e1ad7742a34c9588ecbb227c5f088a1e2`; base binary SHA256 `d59afeea13c161d5ea6f3d4ec1bfe3792113f4c3b4d4ba06bf083a1fa1243cb0`. Sanitized full evidence is retained separately (archive SHA256 `48653eefe6a508fcab98b226c8d81e116afeeaf325994fe555d839c84fc8fc27`); raw logs, credentials, database files and binaries are excluded from the product diff. Corrected harness/configuration attempts remain recorded separately from passing terminal runs. ### Earlier main integration validation Previously independently reviewed product head: `7ef0ec492807175683966e09c9edf58f77b121ae`, tree `c5e87fff5a81b1398af2f9beba369727531897fc`. Merge `e789e971` retains published history and pinned main `00c103b68bd2b39194147508445956f5ece16dda`; official regeneration resolved the sole generated-parser conflict with zero grammar conflicts and identical repeat output. Main JSON_TABLE charset support and RENAME USER rules are both retained. The following commit removes only 18 lines containing three unused name-based login SQL constants and three helpers; live user-ID bookkeeping and other management paths remain unchanged. No suppression or golden update. Fresh exact-`7ef0ec49` validation on Go 1.27.1/Darwin arm64: - Configured incremental lint across five feature packages: 0 issues. - Frontend normal: 2699 passing roots, one existing skip, 29.591s; owning race: 2698 passing roots, the same skip, 50.685s. The extra normal-only allocation test has an explicit !race build constraint. All 17 feature roots passed in both modes; count=1 and vet=all. - Minimal real SQL `TestRenameUserIdentity`: PASS, package 8.451s, no skip. Actual binary SHA256 `24355ebdc6e76e25e9e91fc16c07dc28a77258d819ab091a2ccfe6484ac09fe2`. - `TestDropAccountDuringAsyncIndexInit`: PASS, test 7.49s/package 11.783s, no skip. Used CI short/matrixone_test/set-coverage and the CI-policy 484-package instrumentation argument while selecting only this test. Darwin arm64/p2 differs from Linux x64/p8 CI. Full profile SHA256 `8e0228222099d326fa9b18542ee766dca336efa9899a7ea8d3f48671bdea3ef5`. - Parser owning group from merge `e789e971`: 361 passing roots/2245 named entries, no test skips, including RENAME USER and JSON_TABLE charset/roundtrip. Parser/native inputs are unchanged by the helper deletion, so this is explicit closure reuse. Native dependencies were rebuilt for main's USearch 2.26.5 and passed provenance verification. Old `2dc7122d` coverage failed after 124.21s; the first failing assertion is unavailable in retained summary evidence. No identical-cause attribution to another PR or old-baseline reproduction is claimed. Candidate main includes `fe4fc722` (#31237); the new selected local pass does not certify Linux CI or establish the old failure's exact cause. The earlier `38ab30c9` multi-process/bootstrap, deterministic engine conflicts, snapshot/restart and exact base-to-head offline replacement results above remain historical exact-input evidence, not reruns at `7ef0ec49`. Final integration evidence archive SHA256 `340f6cd025bf433adc9c264471607c42c26dcf7d078ce3acf6b235a95f14a347` includes the recovery bundle, logs and full coverage profile. Owned runtime processes exited and fixture admission/port leases were released. ### Prior upstream HNSW fixture sync Previously tested head: `a3ffbf4924876e2c08c3886c95782362eaeef7ae`, tree `ee3acaba7098ad37387c1abf11b75b7fccd81698`. Normal merge of main `d4ffbae43d55da21526eab01722cbef14bb01ed5` (#31457) onto `7ef0ec49`. The complete delta equals the upstream two-file HNSW fixture patch (15 added/2 removed lines); no product, grammar, dependency or native input changed, and no local golden was generated. The fixture shortens the supported freshness sweep on every CN and restores its default; existing exact serving assertions remain intact. Fresh Go 1.27.1/Darwin arm64 official build and mo-tester comparison passed on isolated independent 1 LOG/1 TN/2 CN/1 PROXY processes. Through each of CN1, CN2 and PROXY, `vector_hnsw_delete_insert` passed twice (58/58 each); adjacent `vector_hnsw_modern_dml` (14/14), `vector_hnsw_clone_sync` (13/13) and `vector_hnsw_snapshot` (27/27) passed once each: 15 runs, 510 statements, zero failed/ignored/abnormal. Both-CN teardown checks passed after every case, canonical files stayed unchanged, all five processes exited 0 and owned listeners were released. Service SHA256 `77c08a9ad7acf90efe3a7963dbaed9b3a9dc7439c78d00ba26e619fcc9e6b108`. SQL, ISCP and two-CN query registration were checked before comparisons. A prior proxy-configuration attempt ran zero cases and was cleaned up before the corrected run. Old `7ef0ec49` [CI run 40503227834](https://github.com/matrixorigin/matrixone/actions/runs/40503227834) is terminal failure: ordinary UT, coverage UT, SCA, build and PESS passed; PROXY failed three HNSW assertions (serve_ready expected 1/actual 0 twice, nearest ID expected 2001/actual 777). This is consistent with the missing fixture setting, without independently proving identical root cause. The aggregate coverage summary lacks a complete profile; it does not establish inadequate coverage percentage. The fresh local pass does not replace new-head Linux CI. Prior `7ef0ec49` product validation remains explicit reuse; historical `38ab30c9` topology/upgrade evidence is unchanged. ### Prior a3 CI and review readiness [MatrixOne ALL CI 40515449623](https://github.com/matrixorigin/matrixone/actions/runs/40515449623) completed successfully for exact head `a3ffbf4924876e2c08c3886c95782362eaeef7ae`. [CI Required 122261048725](https://github.com/matrixorigin/matrixone/actions/runs/40515449623/job/122261048725), shared build, ordinary UT, coverage UT, SCA, PESS and PROXY multi-CN BVT, and the coverage aggregate all passed. Conditional release/upgrade/optimistic jobs were skipped; they are not additional test passes. This supersedes the initial queued status for this head and leaves the historical `7ef0ec49` and `2dc7122d` failures and their attribution limits above intact. Ready for normal maintainer review; no merge or deployment is requested by this status update. ### Remaining limits NOT_RUN: separately pinned historical released-version/catalog upgrade, rolling or mixed-version serving, downgrade, multi-host deployment, complete repository/distributed mo-tester BVT and runtime MySQL comparison oracle. Five legacy labels unavailable through supported fixture creation remain explicitly skipped. The historical exact base-to-head result is not arbitrary released-version upgrade certification. Exact-head CI results and pending checks are recorded above. Skipped CI jobs do not certify the corresponding runtime scenarios; no production release approval is claimed. ### Previous exact-head validation (superseded by 25d3008) Remote head `a26b4503473db9554f4b0a2a3d977aefa25a2278` on `codex/issue-30467-rename-user-20261027` (base `b0c61f3c771694eb3cdaa44732b56713aafe53b4`) was checked in workflow run [43202499673](https://github.com/matrixorigin/matrixone/actions/runs/43202499673). `CI Required`, Ubuntu/x86 UT, Linux/arm64 SCA, shared build, and PROXY/PESS multi-CN BVT jobs passed. Conditional release/upgrade and other disabled jobs were skipped; they are not counted as passes. This exact-head CI result does not close the separate Proxy migration, broader compatibility, or deployment-validation limits above. ### Current exact-head validation Remote head `25d3008a44a03fe585332e8b44a774748274ea56` on `codex/issue-30467-rename-user-20261027` (base `b0c61f3c771694eb3cdaa44732b56713aafe53b4`) resolves the two non-blocking SHOW GRANTS findings from the follow-up review: implicit forms now use the authenticated catalog username for the legacy result-column label while retaining stable-user-ID grant filtering; the maintained BVT enables metadata comparison for four implicit forms and expects the resolved username in the initial-session header. Focused tests passed: - `GOWORK=off .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=120s -run '^TestCurrentUserShowGrantsColumnName$' ./pkg/sql/plan` - `GOWORK=off .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=120s -run '^TestTxnCompilerContextCurrentUserIdentity$' ./pkg/frontend` - `gofmt` and `git diff --check` passed. Local distributed BVT was not run. Exact-head GitHub Actions run [43232340868](https://github.com/matrixorigin/matrixone/actions/runs/43232340868): the PROXY BVT job executed `zz_accesscontrol/rename_user.sql` with 66/66 assertions passing, zero failed/ignored/abnormal; the PESSIMISTIC multi-CN BVT, Linux/arm64 SCA, shared build, and UT coverage jobs also passed. Ubuntu/x86 UT is still in progress, so `CI Required` is pending and no overall green-CI claim is made. Conditional and disabled jobs were skipped. Local `go vet` and `golangci-lint` attempts did not complete cleanly because of dependency/type-check diagnostics in unchanged cgo/usearch/vectorindex areas; they are not reported as passes. The remaining Proxy migration and deployment/compatibility limits described above remain separate from these SHOW GRANTS fixes. ### Current exact-head sync and validation Remote PR head `14d8861ff0c2ea91ec339f46072ae186f5aa9698` normally merges PR head `25d3008a44a03fe585332e8b44a774748274ea56` with `main` `99605b39146848b56accc85bf933badf50a1fefc`. The sole integration conflict was `pkg/sql/plan/build_show.go`: main's account-scoped object resolution and role/explicit-user paths are retained, while implicit current-user grants continue to use the authenticated stable user ID. The maintained rename-user BVT result reflects main's resolved object-scope output. On this exact merged tree, the focused `pkg/sql/plan` SHOW GRANTS selection passed (5 matching tests) through `mo-cgo-test -count=1`; `git diff --check` passed. Local distributed BVT was **NOT_RUN** because `mo-tester` and `mo-service` are unavailable in the worktree. At the time of publication, exact-head UT, coverage UT, SCA, shared build and two E2E checks were still running; completed checks had no failures. Reviewer re-review remains pending. This update does not claim full CI/BVT acceptance or request merge. ### Historical exact-head validation (62c8b2a; superseded by 043acce) At that time, remote head `62c8b2a2a313e91aab9652a4be3b464a963a0489` was open and Ready, based on main `437c648450ffd9f87c574036534c5ca546e88594`. The prior-head ALL CI run `43349639832` reported PROXY `rename_user.sql` at 62/66. Local exact-tree comparison reproduced only four metadata precision mismatches: VARCHAR type/scale and returned rows matched, while the fixture's precision value `633` differed from the isolated catalog's `20538`. The four SQL-level metadata overrides are now disabled; row comparisons remain enabled, and the focused plan test covers the identity-specific column label. Using the pinned mo-tester `309a0ca650e0c55e90292767fd61e4976818d66d` and a task-owned service built from `277b9c685d8f3b17d30a2555268ff09568e5bad3`, the exact case passed twice on the same isolated instance: 66/66 each, zero failed/ignored/abnormal. Post-run catalog checks found zero `ru30467%` users, roles, or databases. The focused `pkg/sql/plan` tests passed (5 tests, 2.057s); product source is unchanged by this test-only commit. At that time, new-head CI for `62c8b2a2a313` had not yet returned. Six reviewers remained requested; approval on that head was pending. ### Current exact-head sync and validation (043acce) Remote PR head `043acce4c08d21a1ff7c8f9a5d76938304589764` is open and Ready, based on main `3ac43c9f56eeaa7cdf6e5f45987792d9878fae8f`. The generated MySQL parser conflict was regenerated from the merged grammar; all 803 token constants retain main's values and the parser is gofmt-clean. Local exact-head validation on this merged tree passed: - Full `pkg/sql/parsers/dialect/mysql` tests. - Focused frontend RENAME USER and renamed-binding tests. - `pkg/proxy` `TestRenameUserProxyMigrationPrincipal`. - Focused `pkg/sql/plan` SHOW GRANTS tests. - `git diff --check`. Exact-head ALL CI run [43380980852](https://github.com/matrixorigin/matrixone/actions/runs/43380980852) completed with `CI Required` failed. The Ubuntu/x86 UT job reached its configured 120-minute hard timeout. Its retained log records the batched embedded-cluster `pkg/tests/sqlintegration` runner being terminated with status 143; GitHub reports exit code 2 for the job step. Its summary reports failures in `pkg/tests/sqlintegration` — `TestLoadCSVStrictProbeFallback/BOM_restart_fallback`, `TestIssue30949PublicationSnapshotLifecycleAdmission`, `TestDecimalHistoricalDumpRoundtrip`, `TestFilteredSetOperationProjection`, and `TestHiddenIndexUserAccess` — and `pkg/tests/issues` — `TestCheckpointColdSnapshotSurvivesDatabaseDrop`. Retained artifacts omit the individual assertion/error bodies, so the causes and attribution to this PR remain unresolved. This is not being classified as flaky or upstream. Preflight, shared build, Linux/arm64 SCA, coverage UT, PROXY BVT, PESSIMISTIC multi-CN BVT and coverage passed; Connector/J and Iceberg E2Es passed. Conditional and disabled jobs were skipped. fengttt's latest formal question about stable account/user identity and the migration proto has been answered in the PR conversation, and a re-review was requested. Six reviewers are currently requested; reviewer acceptance is pending. Deployment QA remains separate and unperformed. No merge is claimed. ### Current exact-head validation (642d4a4) This test-only delta fixes two direct migration fixtures that bypass Proxy but hand-build `MigrateConnToRequest`. They now copy the source `Principal` from the exported snapshot before releasing it and pass that identity into the target request, matching the feature's fail-closed migration contract. - On head `642d4a43c7ac5fdb078d7e82a25049e98fe5193d`, the focused `TestCRC32JSONBinaryPrepared` and `TestCRC32AndPlainPreparedMigrateBetweenCNs` selection passed with `-count=1`. - `gofmt` and `git diff --check` passed. Local `go vet` did not complete: unchanged usearch CGo dependency compilation sees an installed-header/API arity mismatch; this is not reported as a code pass or attributed to the two edited tests. - Exact-head CI run [44086606829](https://github.com/matrixorigin/matrixone/actions/runs/44086606829) has UT, coverage UT, arm64 SCA and shared build in progress; preflight and coverage eligibility passed. Connector/J attempt [44086611249](https://github.com/matrixorigin/matrixone/actions/runs/44086611249) failed while fetching Maven 3.9.9 from Maven Central; only that job is being rerun. `CI Required` is not yet terminal. - Existing reviewer requests remain active. No review acceptance at this new head, merge, or broader QA is claimed.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #29562, #31146 and #29699.
What this PR does / why we need it:
Fix missing registration-side initialization provenance and reduce embedded-test idle time, using the existing lifecycle and timing owners.
ISCP correctness: coverage job 121415962342 fails only
TestDropAccountDuringAsyncIndexInit. A fresh clone job is registered with Init stage and LifecycleVersion=0, then startup repair durably quarantines it as ambiguous legacy initialization. REINDEX never starts, so the test waits two minutes for an initializer that cannot run.Persist the existing atomic lifecycle marker in the caller's registration transaction for new InitSQL generations. Keep the Init stage, actual initialization, atomic SQL/status commit, cancellation/drop fencing, and legacy unmarked-row quarantine. Non-InitSQL registrations and existing rows are unchanged; no new state, schema field, scheduler or recovery exception.
Extend the existing real multi-CN case with a durable registration assertion, and the existing recovery matrix with a fresh LSN=0 versioned generation. Keep every legacy unsafe/retry control and the actual cross-CN conflict, rollback and account/job cleanup checks. No additional cluster fixture or timeout increase.
Test idle time: use the existing
WithTestingtiming owner to set unset ISCP discovery/index-watermark periods to the local BVT cadence (1s). Preserve explicit settings,WithPreStartoverrides, production defaults and all functional assertions.Validation:
Final fresh-process race confirmation also passes: recovery matrix 100 repetitions and the real initialization/account-drop case with adaptive count=1. Full CI results remain pending.