Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
docs(tidb): correct stale omni bridge-removal comments (#20472)
Vincent Huangeabd60ebdc81
diff --git a/backend/plugin/advisor/tidb/utils.go b/backend/plugin/advisor/tidb/utils.goindex ce2438d4fc..ab9585bb11 100644--- a/backend/plugin/advisor/tidb/utils.go+++ b/backend/plugin/advisor/tidb/utils.go@@ -57,7 +57,9 @@ func (t tablePK) tableList() []string {return tableList}-// getTiDBNodes extracts pingcap-AST nodes for un-migrated advisors.+// getTiDBNodes extracts pingcap-AST nodes. Post-dml_dry_run migration (PR+// #20467) its only consumer is advisor_builtin_prior_backup_check, which uses+// pingcap AST for authoritative DDL detection on its dual-path (cumulative #30).//// On a PingCapASTProvider whose AsPingCapAST returns (nil, false) — i.e.// the bridge tried and pingcap rejected the statement — the statement isdiff --git a/backend/plugin/parser/tidb/omni.go b/backend/plugin/parser/tidb/omni.goindex 0e556bb04f..f22d0c539e 100644--- a/backend/plugin/parser/tidb/omni.go+++ b/backend/plugin/parser/tidb/omni.go@@ -20,10 +20,14 @@ import (// *OmniAST from ParseStatements, those un-migrated advisors keep working// because GetTiDBAST routes through AsPingCapAST() automatically.//-// Bridge cleanup is deferred until Phase 2 §Tier 4g (NonTransactionalDMLStmt-// + production-grade restore equivalent) ships and `dml_dry_run` (the one-// Class III advisor) can migrate. See plans/2026-04-23-omni-tidb-completion--// plan.md §1.5.0 invariant #4 + Bridge persistence rule.+// The PingCapASTProvider bridge is retained after the dml_dry_run migration+// (PR #20467): its sole remaining consumer is advisor_builtin_prior_backup_check,+// which reads pingcap AST for authoritative DDL detection on its dual-path+// (cumulative #30). Removal is gated on that consumer moving its DDL detection+// off pingcap (deemed brittle, deferred) — NOT on any advisor migration. (This+// is distinct from the dispatcher's Option B pingcap-fallback for omni-rejected+// SQL, which persists until Option A retirement; see dispatcher.go + invariant+// #8 in plans/2026-04-23-omni-tidb-completion-plan.md §1.5.0.)//// Mirrors backend/plugin/parser/mysql/omni.go's AsANTLRAST pattern:// - Lazy parse + cache via pingcapParsed flag (matches mysql's antlrParsed).@@ -39,8 +43,8 @@ type OmniAST struct {// pingcapAST is lazily populated when AsPingCapAST() is called for the// first time. Cached for the lifetime of this OmniAST instance.- // Will be removed once dml_dry_run migrates and the bridge is no longer- // needed (post-Phase-2 §Tier 4g).+ // Retained for the prior_backup_check dual-path (cumulative #30); see the+ // type doc above.pingcapAST *AST// pingcapParsed tracks whether we've attempted the native parse, to// distinguish "not yet parsed" from "parsed and got nil".