Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#58575
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
D3Hunter authored and ti-chi-bot committed Feb 25, 2025
1 parent 9b364e6 commit 7d61d28
Show file tree
Hide file tree
Showing 4 changed files with 1,226 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/ddl/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,12 @@ func doReorgWorkForCreateIndex(w *worker, d *ddlCtx, t *meta.Meta, job *model.Jo
for _, indexInfo := range allIndexInfos {
indexInfo.BackfillState = model.BackfillStateReadyToMerge
}
<<<<<<< HEAD
ver, err = updateVersionAndTableInfo(d, t, job, tbl.Meta(), true)
=======
ver, err = updateVersionAndTableInfo(jobCtx, job, tbl.Meta(), true)
failpoint.InjectCall("afterBackfillStateRunningDone", job)
>>>>>>> 247a47641ce (ddl: fix addindex wrong rowcount on dxf when the job txn failed (#58575))
return false, ver, errors.Trace(err)
case model.BackfillStateReadyToMerge:
logutil.BgLogger().Info("index backfill state ready to merge", zap.String("category", "ddl"), zap.Int64("job ID", job.ID),
Expand Down Expand Up @@ -2125,9 +2130,15 @@ func (w *worker) executeDistGlobalTask(reorgInfo *reorgInfo) error {
// It's possible that the task state is succeed but the ddl job is paused.
// When task in succeed state, we can skip the dist task execution/scheduing process.
if task.State == proto.TaskStateSucceed {
<<<<<<< HEAD
logutil.BgLogger().Info(
"global task succeed, start to resume the ddl job",
zap.String("category", "ddl"),
=======
w.updateDistTaskRowCount(taskKey, reorgInfo.Job.ID)
logutil.DDLLogger().Info(
"task succeed, start to resume the ddl job",
>>>>>>> 247a47641ce (ddl: fix addindex wrong rowcount on dxf when the job txn failed (#58575))
zap.String("task-key", taskKey))
return nil
}
Expand Down
Loading

0 comments on commit 7d61d28

Please sign in to comment.