Skip to content

Commit 3341116

Browse files
authored
br: change start mode in nextgen build (#64320)
close #64332
1 parent a440475 commit 3341116

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

br/pkg/gluetidb/glue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func (g Glue) startDomainAsNeeded(store kv.Storage) error {
115115
if err != nil {
116116
return err
117117
}
118-
return dom.Start(ddl.Normal)
118+
return dom.Start(ddl.BR)
119119
}
120120

121121
func (g Glue) createTypesSession(store kv.Storage) (sessionapi.Session, error) {

pkg/ddl/ddl.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ const (
109109
// the DDL owner, to make sure all upgrade related DDLs are run on new version
110110
// TiDB instance.
111111
Upgrade StartMode = "upgrade"
112+
// BR mode, Start DDL from br, with this mode can skip loadSystemStore in next-gen and initLogBackup.
113+
BR StartMode = "br"
112114
)
113115

114116
// OnExist specifies what to do when a new object has a name collision.

pkg/domain/domain.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -827,9 +827,11 @@ func (do *Domain) Start(startMode ddl.StartMode) error {
827827
}, "closestReplicaReadCheckLoop")
828828
}
829829

830-
err = do.initLogBackup(do.ctx, pdCli)
831-
if err != nil {
832-
return err
830+
if startMode != ddl.BR {
831+
err = do.initLogBackup(do.ctx, pdCli)
832+
if err != nil {
833+
return err
834+
}
833835
}
834836

835837
// right now we only allow access system keyspace info schema after fully bootstrap.

0 commit comments

Comments
 (0)