Repository navigation
fix: optimize SHOW ACCOUNTS and harden 4.2 CI - #32105
Conversation
Backport the account-size aggregation from matrixorigin#31437 to 4.2-dev. Preserve forced refresh and the existing TN fallback while avoiding per-table statistics materialization for the normal multi-account path. Related to matrixorigin#31388. (cherry picked from commit b936222)
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: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 4f865e785a8e6b814158f7aafedafc5088c9ac51
Assessment: approve
The optimization replaces per-table Go materialization with account-sized SQL results while reusing existing refresh and policy owners. Live-identity matching, numeric semantics, tenant isolation and TN/snapshot fallback are preserved without adding caches or workers. No actionable findings remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed all eight changed files, both discussion entries and linked issue context; saved discussion-assessment.json.
-
Preflight and exact-head native build passed. Source and native artifact identities were verified.
-
Full frontend and disttae normal suites passed: 2,001 top-level tests after recovering a module-proxy download failure.
-
Real-engine numeric and stale-identity regression cases passed.
-
Public MySQL integration passed twice in one process, including cleanup and fixture reuse.
-
Commands, source fingerprints, exits and retained logs were reconciled in validation-report.json. Source remained unchanged.
Limitations:
-
Race, static-analysis and two-CN performance results were reused from frozen author reports; they were not rerun locally.
-
The original production-scale workload and its latency/GC guarantees remain unverified. SQL scan/join work still depends on table count.
-
The frozen CI snapshot had no completed product checks; no CI pass is claimed.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 1f080e4e2b1447b1dc4a8601fd8c63c8befbb219
Assessment: approve
No actionable findings. Account aggregation reuses existing SQL, refresh and fallback owners; watcher cancellation and cleanup are coherent, and the prebuilt image preserves the existing runtime layout.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Isolation preflight passed. The system package passed normal and race runs, with 13 top-level tests each.
-
All four watcher tests passed 100 exact-name race repetitions each.
-
Compose configuration confirmed 120-second shutdown grace, exec entrypoints and coverage settings for all five MatrixOne services.
-
Reused supplied review 5758475758 for eight unchanged SHOW ACCOUNTS files after verifying their identity.
-
Retained logs, terminal exits and receipts reconciled in validation-report.json; frozen patch matched Git and source remained unchanged. All discussion keys were assessed.
Limitations:
-
SQL/public SHOW, image deployment, two-CN and performance evidence was reused from supplied reports without fresh local reproduction or their raw logs.
-
External CI workflow bodies and staged artifacts were unavailable; frozen build, UT, SCA and coverage checks were incomplete.
-
Production-scale p99/GC impact remains unverified.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 297137f5fb13207e63efd4707acf2e0ef220dc9d
Assessment: approve
The aggregation reuses existing MTS execution and refresh paths while preserving TN and snapshot fallback. Watcher shutdown and fixture cleanup have coherent ownership. No actionable defects remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed all 14 changed files, six discussion entries, linked issue context and affected owners/consumers.
-
Verified source identity before reusing supplied unit, real-engine and watcher race evidence; assessed revised fixture validation as author-reported.
-
Static audit passed: patch/head identity, formatting of 10 Go files, complete discussion coverage and 64 BVT regex controls. Receipt: checks/1793763673804351592-3.json; retained output: static-audit.log.
-
Saved review-plan.md, discussion-assessment.json, source-review.md and receipt-reconciliation.json.
Limitations:
-
Frozen UT, SCA, coverage and two BVT lanes remain pending.
-
No fresh local Go/race or image build; supplied execution reports lack raw receipts in this snapshot.
-
Production-scale p99 latency and GC effects remain unverified; SQL work still scales with table count.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #31388. Backports and refines #31437 for
4.2-dev.What this PR does / why we need it:
SHOW ACCOUNTSpreviously materialized every table's statistics in Go even when it only needed a per-account total. This was expensive for accounts with many tables.Aggregate current sizes in SQL using the complete live account/database/table identity and a bounded account scan. Preserve per-table truncation, forced single-account refresh, admission policy, TN fallback and snapshot size. The shared embedded-cluster fixture can now use a caller-owned data directory without changing the process-wide temporary directory or bypassing the shared port lease.
Backport the runtime-only CI Dockerfile and cgroup watcher shutdown fix so BVT jobs can reuse the validated build artifact and write coverage on exit. Give Compose services a 120-second shutdown grace period: the previous default could kill TN or LOG while closing and lose coverage counters.
Validation
-race. A separate frontend test covers preservation of nonzero TN snapshot sizes; the live test does not force asynchronous snapshot accounting to become nonzero.pkg/embedrace, incremental formatting, vet, molint and golangci-lint passed for the changed embed and public-test packages. Earlier full frontend and disttae normal/race runs, the focused real-engine race tests and the cgroup watcher checks remain applicable to their unchanged code.A pre-existing 4.2
result_scanissue misreads savedSHOW ACCOUNTSfloat fields on both baseline and candidate, so the public test compares MySQL results directly. Out-of-range Go float-to-uint conversions remain implementation-dependent.