Skip to content

Commit

Permalink
Online DDL: support --retain-artifacts DDL strategy flag
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <[email protected]>
  • Loading branch information
shlomi-noach committed Sep 19, 2023
1 parent ad4a4c6 commit 507990b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/vt/vttablet/onlineddl/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -4634,6 +4634,10 @@ func (e *Executor) SubmitMigration(

revertedUUID, _ := onlineDDL.GetRevertUUID() // Empty value if the migration is not actually a REVERT. Safe to ignore error.
retainArtifactsSeconds := int64((retainOnlineDDLTables).Seconds())
if retainArtifacts, _ := onlineDDL.StrategySetting().RetainArtifactsDuration(); retainArtifacts != 0 {
retainArtifactsSeconds = int64((retainArtifacts).Seconds())
}

_, allowConcurrentMigration := e.allowConcurrentMigration(onlineDDL)
submitQuery, err := sqlparser.ParseAndBind(sqlInsertMigration,
sqltypes.StringBindVariable(onlineDDL.UUID),
Expand Down

0 comments on commit 507990b

Please sign in to comment.