You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempt instant DDL early and add --force-instant-ddl flag
Move the --attempt-instant-ddl check to run before ghost table and binlog
streaming setup. If instant DDL succeeds, the migration completes immediately
without creating ghost tables, changelog tables, or starting binlog streaming.
Add --force-instant-ddl flag that aborts the migration if ALGORITHM=INSTANT
is not supported, preventing accidental multi-hour row-copy migrations when
the intent was an instant metadata change.
flag.BoolVar(&migrationContext.AttemptInstantDDL, "attempt-instant-ddl", false, "Attempt to use instant DDL for this migration first")
73
+
flag.BoolVar(&migrationContext.ForceInstantDDL, "force-instant-ddl", false, "Require instant DDL; abort if the operation cannot be completed instantly (do not fall back to regular migration)")
73
74
storageEngine:=flag.String("storage-engine", "innodb", "Specify table storage engine (default: 'innodb'). When 'rocksdb': the session transaction isolation level is changed from REPEATABLE_READ to READ_COMMITTED.")
74
75
75
76
flag.BoolVar(&migrationContext.CountTableRows, "exact-rowcount", false, "actually count table rows as opposed to estimate them (results in more accurate progress estimation)")
@@ -230,6 +231,9 @@ func main() {
230
231
ifmigrationContext.AttemptInstantDDL {
231
232
log.Warning("--attempt-instant-ddl was provided with --revert, it will be ignored")
232
233
}
234
+
ifmigrationContext.ForceInstantDDL {
235
+
log.Warning("--force-instant-ddl was provided with --revert, it will be ignored")
236
+
}
233
237
ifmigrationContext.IncludeTriggers {
234
238
log.Warning("--include-triggers was provided with --revert, it will be ignored")
0 commit comments