Skip to content

Commit

Permalink
remove useless func per review
Browse files Browse the repository at this point in the history
  • Loading branch information
morgo committed Nov 15, 2022
1 parent 0310f9f commit 59c1a24
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions go/logic/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func (this *Migrator) Migrate() (err error) {
// Attempt to do this if AttemptInstantDDL is set.
if this.migrationContext.AttemptInstantDDL {
this.migrationContext.Log.Infof("Attempting to execute alter with ALGORITHM=INSTANT")
if err := this.attemptInstantDDL(); err == nil {
if err := this.applier.AttemptInstantDDL(); err == nil {
this.migrationContext.Log.Infof("Success! table %s.%s migrated instantly", sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.OriginalTableName))
return nil
} else {
Expand Down Expand Up @@ -745,13 +745,6 @@ func (this *Migrator) initiateServer() (err error) {
return nil
}

// attemptInstantDDL tries to apply the DDL statement directly to the table
// using a ALGORITHM=INSTANT assertion. If this fails, it will return an error,
// in which case the original algorithm should be used.
func (this *Migrator) attemptInstantDDL() (err error) {
return this.applier.AttemptInstantDDL()
}

// initiateInspector connects, validates and inspects the "inspector" server.
// The "inspector" server is typically a replica; it is where we issue some
// queries such as:
Expand Down

0 comments on commit 59c1a24

Please sign in to comment.