Skip to content

Commit

Permalink
ddl/ingest: fix checkpoint resume when owner changes several times (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jul 10, 2023
1 parent ea0ed97 commit b774a1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions ddl/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,7 @@ func (w *worker) addTableIndex(t table.Table, reorgInfo *reorgInfo) error {
if err != nil {
break
}

finish, err = updateReorgInfo(w.sessPool, tbl, reorgInfo)
if err != nil {
return errors.Trace(err)
Expand Down
6 changes: 3 additions & 3 deletions ddl/ingest/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,13 @@ func (s *CheckpointManager) resumeCheckpoint() error {
if cp := reorgMeta.Checkpoint; cp != nil {
s.minKeySyncGlobal = cp.GlobalSyncKey
s.globalCnt = cp.GlobalKeyCount
s.pidGlobal = cp.PhysicalID
s.startGlobal = cp.StartKey
s.endGlobal = cp.EndKey
if s.instanceAddr == cp.InstanceAddr || cp.InstanceAddr == "" /* initial state */ {
s.localDataIsValid = true
s.minKeySyncLocal = cp.LocalSyncKey
s.localCnt = cp.LocalKeyCount
s.pidGlobal = cp.PhysicalID
s.startGlobal = cp.StartKey
s.endGlobal = cp.EndKey
}
logutil.BgLogger().Info("[ddl-ingest] resume checkpoint",
zap.Int64("job ID", s.jobID), zap.Int64("index ID", s.indexID),
Expand Down

0 comments on commit b774a1f

Please sign in to comment.