Repository navigation
test: guard ODKU metadata admission during concurrent DROP INDEX - #29747
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed commit e17557d against 83d82b8.
Changes needed: one P2 finding, attached inline. The late-admission barrier must identify the actual public writer transaction before pausing or counting metadata admission; a CN-wide first-request capture does not isolate it from the shared cluster's background SQL.
The remaining design is appropriately scoped: it extends the existing ownership UT and reuses the authenticated two-CN fixture, existing lock observation and cleanup owners without adding production execution paths or runtime overhead. Commit/rollback controls and the final public SQL oracles are useful. This adds main regression coverage; it does not establish resolution of the original 4.2 incident #29715.
Validation: formatting and diff checks passed. The local focused race test did not start because matching native CGo artifacts were unavailable. Author-reported normal/race/same-process repetition evidence was examined; the competing unrelated-transaction interleaving was verified by source tracing, not dynamically reproduced locally. CI was pending at review completion. No existing human review or inline thread was present to close.
Submitted as COMMENT because this PR is authored by the current account; this is not an independent approval.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review of commit 8f3dd22 against main/base 83d82b8.
Recommendation: approve from the code-review perspective. No new verified material blocker was found in the complete two-file diff.
The original P2 is addressed: the CN-wide barrier identifies the actual public autocommit writer transaction before capturing or pausing it, and result observations count only that captured transaction. The real competing CN0 transaction exercises isolation before writer launch and while the writer is paused. Removing only the writer identity predicate causes the competing INSERT to fail at its bounded deadline, with cleanup and failed-fixture quarantine completing.
The design is appropriately scoped. It extends the existing compiler ownership UT, reuses existing session identity matching, SQL/lock-observation helpers and the authenticated two-CN fixture, and adds no production state machine, storage, execution path or runtime overhead. The distinct commit, rollback and late-admission cases retain exactly-once data, dropped-index catalog and unique-value-reuse oracles. Metadata keys are acquired in one batch per attempt, so two admissions cannot simply mean two keys.
Reviewed cancellation, partial failure before worker launch, barrier release, worker joining, hook removal, session close/reset identity safety and same-instance fixture reuse. No unreachable added branch, unused field, redundant fixture or unjustified abstraction was identified. The added probe and narrow adapter UT prove different contracts and justify their maintenance cost.
Validation evidence was inspected and reused after confirming current source fingerprints and relevant inputs: focused normal/race compiler and public tests, unchanged CREATE INDEX/DDL consistency controls, exact public regression under -race -count=3 (nine subscenarios in one process), the negative identity-filter control, and incremental formatting/vet/molint/golangci checks. This review did not rerun those unchanged checks. Ubuntu/x86 UT and Linux/arm64 SCA CI remain in progress; this recommendation does not claim full CI success.
All substantive existing review comments are closed: one P2 thread, verified against code and control evidence. This PR adds main regression coverage; resolution/backport of the original 4.2 incident #29715 remains unproved and outside this change's scope.
Submitted as COMMENT because the current account is the PR author. This records a no-blocker recommendation, not an independent GitHub approval. No subagents were used.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #29715, reported on 4.2. This adds main regression coverage; it does not close the 4.2 issue or backport its existing fix.
What this PR does / why we need it:
ODKU concurrent with DROP INDEX must preserve write metadata admission and rebuild a stale plan before touching a removed hidden index. Main already contains #27792's scan ObjectRef copying correction. This PR guards that ownership boundary and the public ALTER TABLE DROP INDEX path.
The probe adds one row/table to the existing cluster; late admission took 0.08s in the focused normal run, excluding shared-cluster setup. Production behavior and runtime overhead are unchanged. The exact historical failing stack/first bad commit remain unproved; the controlled isolation test does not depend on actual cron scheduling.
Validation
Base: 83d82b8. Go 1.27.1, darwin/arm64, repository CGo runner with fresh worktree-native artifacts.
Historical author-reported Linux main diagnostics at this base observed no hidden-table 1146 under the frozen workload, and scan-copy-removal overlays failed ownership assertions. These remain historical evidence, separate from the current checks above.
Focused reproduction:
CI has not been awaited for this update.