Skip to content

Commit

Permalink
init schema in InitDBConfig()
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <[email protected]>
  • Loading branch information
shlomi-noach committed Feb 1, 2021
1 parent da96194 commit d6d8eed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions go/vt/vttablet/tabletmanager/vreplication/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ func (vre *Engine) InitDBConfig(dbcfgs *dbconfigs.DBConfigs) {
return binlogplayer.NewDBClient(dbcfgs.FilteredWithDB())
}
vre.dbName = dbcfgs.DBName

// Ensure the schema is created as early as possible
go vre.Exec(warmUpQuery)
}

// NewTestEngine creates a new Engine for testing.
Expand Down Expand Up @@ -194,9 +197,6 @@ func (vre *Engine) Open(ctx context.Context) {
vre.cancelRetry = cancel
go vre.retry(ctx, err)
}

// Ensure the schema exists
go vre.Exec(warmUpQuery)
}

func (vre *Engine) openLocked(ctx context.Context) error {
Expand Down

0 comments on commit d6d8eed

Please sign in to comment.