Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddl: fix addindex wrong rowcount on dxf when the job txn failed (#58575) #59748

Open
wants to merge 1 commit into
base: release-7.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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