Skip to content

Commit

Permalink
fix bug for upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
crazycs520 committed Apr 10, 2019
1 parent ee7fd24 commit 45d052f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions session/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,14 @@ func bootstrap(s Session) {
logutil.Logger(context.Background()).Fatal("check bootstrap error",
zap.Error(err))
}
// For rolling upgrade, we can't do upgrade only in the owner.
if b {
upgrade(s)
return
}
// To reduce conflict when multiple TiDB-server start at the same time.
// Actually only one server need to do the bootstrap. So we chose DDL owner to do this.
if dom.DDL().OwnerManager().IsOwner() {
if b {
upgrade(s)
return
}
doDDLWorks(s)
doDMLWorks(s)
return
Expand Down

0 comments on commit 45d052f

Please sign in to comment.