Skip to content

Commit

Permalink
ddl, test: fix data race in owner change test (#44536)
Browse files Browse the repository at this point in the history
close #44534
  • Loading branch information
ywqzzy authored Jun 9, 2023
1 parent d2f8df6 commit 1061ed2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ddl/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,8 @@ func (d *ddl) Start(ctxPool *pools.ResourcePool) error {
d.sessPool = sess.NewSessionPool(ctxPool, d.store)
d.ownerManager.SetBeOwnerHook(func() {
var err error
d.ddlSeqNumMu.Lock()
defer d.ddlSeqNumMu.Unlock()
d.ddlSeqNumMu.seqNum, err = d.GetNextDDLSeqNum()
if err != nil {
logutil.BgLogger().Error("error when getting the ddl history count", zap.Error(err))
Expand Down

0 comments on commit 1061ed2

Please sign in to comment.