{{ message }}
Repository navigation
docs(tidb): correct stale omni bridge-removal comments - #20472
Merged
Merged
Conversation
The omni.go/utils.go comments said the pingcap bridge "will be removed once dml_dry_run migrates." dml_dry_run has now migrated (PR #20467), but the bridge is retained: advisor_builtin_prior_backup_check uses pingcap AST for DDL detection on its dual-path (cumulative #30), and the dispatcher's Option B fallback still yields pingcap *AST for omni-rejected SQL (FLASHBACK/SEQUENCE/ SPLIT — deferred grammar). Removal is gated on those, not on dml_dry_run. These comments nearly drove an incorrect "delete the *tidbparser.AST arm" cleanup that would have broken TestGetTiDBOmniNodesSkipsPingcapFallbackAST and the invariant #2 soft-fail. Comment-only; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rebelice
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Corrects misleading comments in
backend/plugin/parser/tidb/omni.goandbackend/plugin/advisor/tidb/utils.gothat claimed the pingcap bridge "will be removed once dml_dry_run migrates and the bridge is no longer needed."Why
dml_dry_runhas migrated to omni (PR #20467), but the bridge is retained, for two reasons unrelated to that advisor:advisor_builtin_prior_backup_checkreads pingcap AST for authoritative DDL detection on its dual-path (cumulative Problem syncing RDS instances because rdsadmin private database #30) — it's the bridge's sole remaininggetTiDBNodes/AsPingCapASTconsumer.*ASTfor omni-rejected SQL (FLASHBACK / SEQUENCE / SPLIT — deferred grammar omni doesn't have). Removal there is gated on Option A retirement (telemetry, months out), not on any advisor migration.The old comments nearly drove an incorrect follow-up ("delete the
*tidbparser.ASTarm ingetTiDBOmniNodes, 3-arm → 2-arm") that would have brokenTestGetTiDBOmniNodesSkipsPingcapFallbackASTand violated the Phase 1.5 invariant #2 soft-fail — that arm is exactly what handles the Option B fallback.Scope
Comment-only, no behavior change. The broader "un-migrated advisors" phrasings in the bridge's implementation notes / log messages are left for the dedicated comment-cleanup pass (BYT-9396).
Testing
gofmt,go build,golangci-lint(0 issues), andgo test -short(TestGetTiDBOmniNodesSkipsPingcapFallbackAST+TestTiDBRules) — all green.🤖 Generated with Claude Code