diff --git a/pkg/server/server_sql.go b/pkg/server/server_sql.go index b8fffadb1a84..dd2577a730b7 100644 --- a/pkg/server/server_sql.go +++ b/pkg/server/server_sql.go @@ -85,7 +85,7 @@ type sqlServer struct { // shared between the sql.Server and the statusServer. sessionRegistry *sql.SessionRegistry jobRegistry *jobs.Registry - migMgr *sqlmigrations.Manager + sqlmigrationsMgr *sqlmigrations.Manager statsRefresher *stats.Refresher temporaryObjectCleaner *sql.TemporaryObjectCleaner internalMemMetrics sql.MemoryMetrics @@ -726,7 +726,7 @@ func (s *sqlServer) preStart( DistSQLMode: sessiondata.DistSQLOff, }, }) - migMgr := sqlmigrations.NewManager( + sqlmigrationsMgr := sqlmigrations.NewManager( stopper, s.execCfg.DB, s.execCfg.Codec, @@ -737,7 +737,7 @@ func (s *sqlServer) preStart( s.execCfg.Settings, s.jobRegistry, ) - s.migMgr = migMgr // only for testing via TestServer + s.sqlmigrationsMgr = sqlmigrationsMgr // only for testing via TestServer if err := s.jobRegistry.Start( ctx, stopper, jobs.DefaultCancelInterval, jobs.DefaultAdoptInterval, @@ -772,7 +772,7 @@ func (s *sqlServer) preStart( } // Run startup migrations (note: these depend on jobs subsystem running). - if err := migMgr.EnsureMigrations(ctx, bootstrapVersion); err != nil { + if err := sqlmigrationsMgr.EnsureMigrations(ctx, bootstrapVersion); err != nil { return errors.Wrap(err, "ensuring SQL migrations") } @@ -794,7 +794,7 @@ func (s *sqlServer) preStart( } // Start the async migration to upgrade namespace entries from the old // namespace table (id 2) to the new one (id 30). - if err := migMgr.StartSystemNamespaceMigration(ctx, bootstrapVersion); err != nil { + if err := sqlmigrationsMgr.StartSystemNamespaceMigration(ctx, bootstrapVersion); err != nil { return err } diff --git a/pkg/server/testserver.go b/pkg/server/testserver.go index 2c5af0b468ab..9c24172397b4 100644 --- a/pkg/server/testserver.go +++ b/pkg/server/testserver.go @@ -341,10 +341,10 @@ func (ts *TestServer) JobRegistry() interface{} { return nil } -// MigrationManager returns the *sqlmigrations.Manager as an interface{}. -func (ts *TestServer) MigrationManager() interface{} { +// SQLMigrationsManager returns the *sqlmigrations.Manager as an interface{}. +func (ts *TestServer) SQLMigrationsManager() interface{} { if ts != nil { - return ts.sqlServer.migMgr + return ts.sqlServer.sqlmigrationsMgr } return nil } diff --git a/pkg/testutils/serverutils/test_server_shim.go b/pkg/testutils/serverutils/test_server_shim.go index 61f9afa23829..e0738eb221c2 100644 --- a/pkg/testutils/serverutils/test_server_shim.go +++ b/pkg/testutils/serverutils/test_server_shim.go @@ -112,8 +112,8 @@ type TestServerInterface interface { // JobRegistry returns the *jobs.Registry as an interface{}. JobRegistry() interface{} - // MigrationManager returns the *jobs.Registry as an interface{}. - MigrationManager() interface{} + // SQLMigrationsManager returns the *sqlmigrations.Manager as an interface{}. + SQLMigrationsManager() interface{} // NodeLiveness exposes the NodeLiveness instance used by the TestServer as an // interface{}.