Repository navigation
fix: restrict direct access to physical index relations - #32032
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.
mo-bot review · mo-bot-local · review
Commit: 474c59837b55de5558ddf131889e06dbcb0136d8
Assessment: approve
Reviewed the complete delta and affected authorization, transaction, prepared-plan, metadata and temporary-table paths. Explicit physical-index access is restricted while generated index access remains supported. No actionable unresolved findings.
Model: gpt-6-astra / xhigh
Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2
Validation:
-
Reviewed all 34 changed files, linked issue context and all three discussion entries; saved review-plan.md and discussion-assessment.json.
-
Seven owning-package suites passed. Frontend's sole failure was an unchanged test writing into the read-only checkout; that exact test passed separately from a writable directory.
-
Real MySQL regression passed twice normally and once under race; three neighboring SQL controls passed.
-
Frontend/process race suites passed; the filesystem-dependent export test also passed separately under race.
-
Source/formatting audit, go vet, incremental golangci-lint and pinned molint passed. Linter installation recovered after a proxy timeout.
-
Command receipts, source fingerprints, binary provenance and retained log hashes reconciled in /home/xupeng/.local/state/mo-bot/jobs/1262a44800aa87054e00962f/attempt-1/validation-evidence.json. Source remains unchanged.
Limitations:
-
Execution covered CPU and single-CN operation; no GPU or multi-CN campaign.
-
Existing test skips were recorded and not counted as passes.
-
Historical corruption repair was outside this prevention fix's scope.
-
Supplied CI was pending/queued; unretained author validation claims were not counted as passes.
474c598 to
ea16e70
Compare
|
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: c66af6cfed47098a4306268e557876fa81e22ee1
Assessment: approve
The shared classifier and bounded maintenance provenance close physical-index access while reusing existing authorization, plugin and catalog-upgrade owners. Earlier function-ID and GPU-validation concerns are resolved; no actionable findings remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Reviewed the 156-file change, relevant owners and consumers, linked issue #31436, and all 25 discussion entries; retained review-plan.md and discussion-assessment.json.
-
Fresh preflight and source audit passed: clean pinned source, formatting, function IDs, plugin boundaries, and protobuf consistency; all 559 existing fields and seven enums are preserved. Logs and receipts are retained in attempt-2.
-
Reused source-qualified reported CPU/race, SQL, upgrade, two-CN and GPU-link/reset evidence. The reported current-base TestHiddenIndexUserAccess pass covers renamed-index exclusion and ordinary/partitioned-table statistics.
Limitations:
-
No fresh Go suites were run; supplied execution reports lack retained raw logs. Current-head product CI remains pending.
-
Actual GPU execution remains unverified. Mixed-version deployment is outside the supported shutdown-upgrade contract.
|
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: 91fec36ad3cfe9899ca03964016b627a9608730c
Assessment: approve
No actionable findings remain. Shared classification and bounded, plugin-owned maintenance provenance preserve the access boundary; metadata changes reuse existing view-binding and upgrade owners. Earlier function-ID and GPU-tag validation concerns remain resolved.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Covered all 167 files using source-qualified prior coverage for 121 files and direct assessment of 46 changed/new files and affected consumers. Reconciled all 27 discussion keys.
-
Isolation preflight passed; receipt checks/1793927332610316397-2.json and preflight.log retained.
-
Source audit passed; receipt checks/1793927537783727125-2.json and source-audit.log retained. Verified formatting, plugin boundaries, builtin IDs, preservation of 559 protobuf fields and seven enums, and published PARTITIONS migration bytes.
-
Reused attributed CPU/race, public SQL, upgrade, two-CN and GPU-linked/reset reports within their qualified scope. Final record audit passed; provenance and receipts are recorded in validation-ledger.json.
Limitations:
-
No fresh local product tests; supplied runtime reports lack retained raw logs. Four relevant current-head CI checks remain pending.
-
Actual GPU create/rebuild remains unvalidated under the accepted runtime limitation.
-
Existing user-owned metadata views retain definitions/grants and may expose catalog metadata; direct index-row access remains restricted.
-
Release-derived view tests use the current binary, without an old-binary upgrade.
|
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: 15fb2da4784b6b647c156e6b16a10f684c4994ed
Assessment: approve
Shared classification and bounded, plugin-owned provenance preserve the physical-index access boundary while reusing existing authorization and upgrade owners. The new privilege probe preserves caller precedence and real denials; all three SHOW CREATE snapshots match the current filters. Prior builtin-ID and GPU-tag validation findings remain resolved. No actionable findings remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Covered all 169 paths: qualified 164 identical source/change payloads against the supplied prior review and directly assessed five fresh scopes. Reconciled all 29 discussion items and issue #31436.
-
Preflight and static source, snapshot, protobuf, builtin-ID and plugin checks passed. Preserved 559 existing pipeline fields and seven enums; receipts and logs are reconciled in validation-ledger.json.
-
Reused attributed current frontend race, reporter regression, public SQL and two-CN BVT reports, including both corrected result files passing twice.
Limitations:
-
No fresh local product tests; raw reused execution logs were unavailable. Current build/UT/SCA/coverage CI remains pending.
-
Actual GPU execution remains unvalidated under the accepted limitation. Released-definition upgrade controls use the current binary.
-
Existing user-owned metadata views retain definitions/grants and may expose physical-column metadata; direct index-row access remains restricted.
-
The reported branch-lifecycle timeout remains unexplained despite successful isolated race reruns.
aunjgr
left a comment
There was a problem hiding this comment.
Independent re-review at 15fb2da against main@65b721e1b93c6b9e05db2063b220e0c35916b335. My previous integration blocker is resolved: main's existing builtin identities are preserved, MO_IS_PHYSICAL_INDEX uses the free ID 633 and FUNCTION_END_NUMBER is 634. I also checked the current authoritative main registry rather than relying on the old review.
I reused my earlier access/provenance review only where the PR hunks remain unchanged (108 files), and reviewed the changed classifier/metadata, privilege precedence, plugin operand projection, runtime reset admission, snapshot/clone and regression-test closures. The frontend's successful privilege probe no longer fabricates a denial; caller precedence and real denial ordering remain intact. Maintenance still validates exact role/live identities independently at planning and runtime, rejects inherited broad trust, and readmits after reset. Current COLUMNS filtering covers local and subscription sources before view expansion; new clones retain the local-only policy. Historical TABLES filtering does not rewrite stored snapshot definitions, and released migration definitions remain frozen.
I found no remaining blocking issue. The explicit existing-user-view metadata exception and previously accepted GPU-runtime limitation are retained; neither is misrepresented as direct index-row authority or a real-device validation result. No mixed-version capability mechanism is requested.
Evidence reused: exact-head green CI, the reported affected-owner normal/race suites, current ordinary-user SQL/upgrade controls, the two-CN rebuild/reset checks and normal BVT comparisons. Device-free GPU-tag build/admission evidence is not a claim of real GPU execution. I did not modify PR code or rerun the full integration/GPU suites.
|
mo-bot review · Commit: New discussion was assessed; the previous review remains unchanged. |
|
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: 0ebd4fe61f3e47fa774db2325b28b070df7cb88b
Assessment: approve
No actionable defects remain. Shared classification and bounded operator provenance reuse existing authorization, plugin and upgrade owners. The added provenance is justified by scoped maintenance authority.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed all 169 changed paths and reconciled all 33 discussion entries. Verified preserved builtin IDs, protobuf compatibility, released migration bytes and SQL snapshot oracles.
-
Current-head checks passed: 99 sysview tests/subtests, 480 focused tests/subtests across 22 packages, and public SQL access, metadata-upgrade and expression-default controls.
-
Focused race checks passed 55 tests/subtests across six packages; vet passed for five affected owners. Isolation preflight passed.
-
Commands, source fingerprints, exits and log hashes reconciled in validation-index.json. Earlier two-CN normal/race evidence retained with its original-revision attribution.
Limitations:
-
Real GPU execution remains the previously accepted validation limit; no complete distributed BVT was run.
-
Upgrade controls install released definitions on the current binary; no predecessor-binary upgrade was executed.
-
Existing user-owned metadata views retain the documented visibility exception. Several CI checks were still running in the frozen snapshot.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #31436
What this PR does / why we need it:
An ordinary user who knows a physical index relation's name can otherwise read or mutate index rows independently of its base table. Restrict direct SQL, clone/restore, metadata and SQL-callable maintenance access while retaining sys/moadmin diagnostics and server-owned index maintenance.
The frontend, planner and runtime use the existing relation classification and authorization boundaries. Generated maintenance carries the base and role-specific target identities along its existing path; plugin validation and runtime admission remain independent. Shared role selection, ordered operand projection and table-function admission remove repeated algorithm-specific paths while preserving each algorithm’s validation and reset behavior. Descriptor tests share a table while retaining the algorithm-specific cases. ISCP retains its own source admission and error policy. Authorization happens at setup and reset, not once per data row.
Current TABLES, PARTITIONS and COLUMNS listings use the shared classifier, including local and subscription COLUMNS sources before view-column expansion. New clones of information_schema use local-only filtered definitions. A released historical TABLES snapshot is filtered when its system view is bound, without changing the stored snapshot definition. Published historical view/migration definitions stay frozen and the existing tenant upgrade refreshes current views.
This also retains the CI fixes for test synchronization: disttae cleanup assertions coordinate with the existing worker, and the logtail test checks the pre-write interval separately from compacted-block dirty-table behavior. Production cleanup and logtail behavior are unchanged. See the design and invariants.
The SHOW CREATE expectations now include the current COLUMNS filters. Privilege fast-path probes no longer construct and report a denial for ordinary successful SQL; real denials keep their original ordering and error.
Validation
Current revision
0ebd4fe61f, rebased on main5e024527f7:TestHiddenIndexUserAccessandTestIssue31161ColumnDefaultMetadata, and focused compiler/planner/function/sysview race controls passed. All three SHOW CREATE result rows exactly match the current COLUMNS definition.Validation recorded on the previous revision
15fb2da478(based on65b721e), which passed full CI:show.test189/189 andaccount_restricted.sql125/126, with one existing ignore. Additional statement-level metadata comparisons passed for all three SHOW CREATE results.TestHiddenIndexUserAccess,TestTablePrefixMetadataUpgrade, and the two-CN index rebuild coordinator. Selected concurrency and changed test-local controls passed under race.go vet ./..., formatting and fullgolangci-lint --new-from-rev origin/main ./...passed. Pinnedmolintpassed for changed owners; a full x86 run reports two unchanged unsafe-import findings also reproduced on clean base.TestIssue26404MixedDataBranchLifecycleDoesNotDeadlock/pick; the complete test passed three isolated race runs on this revision. The timeout's cause is not established; the new CI run must verify it.Earlier recorded validation:
information_schema_object_visibilitypasses normal mo-tester result comparison: 135/135 statements, 0 ignored./tmp; the full package passed withTMPDIRon a disk with sufficient free space.gpu,matrixone_testtable-function binary built with race against source-verified CUDA native artifacts.TestCreateEndWithoutRows,TestGPUCreateResetEndDoesNotReuseAdmissionand CAGRA/IVF-PQ reset and changed-configuration admission tests passed under race with the CUDA SDK driver stub.c66af6cf; CI for this update must run separately. The full two-CN rebuild coordinator test passed in normal and race modes, including fulltext and ordinary-user HNSW rebuilds. The earlier two-CN search test is retained as historical evidence.Existing user-owned views, including information_schema clones saved before this change, keep their definitions and grants. A release-derived old clone granted to an ordinary role can still expose physical-index column metadata; this does not grant direct access to index rows. Those views have no reliable clone-origin marker and are not rewritten by this PR. Real CAGRA/IVF-PQ GPU execution remains unvalidated because the available host cannot load its NVIDIA driver; the previously authorized device-runtime exception remains. Mixed-version deployment was not validated.