diff --git a/pkg/ddl/table.go b/pkg/ddl/table.go index 63523481509dd..f61775834ef3e 100644 --- a/pkg/ddl/table.go +++ b/pkg/ddl/table.go @@ -239,8 +239,8 @@ func onCreateTables(d *ddlCtx, t *meta.Meta, job *model.Job) (int64, error) { // We don't construct jobs for every table, but only tableInfo // The following loop creates a stub job for every table // - // &*job clones a stub job from the ActionCreateTables job - stubJob := &*job + // it clones a stub job from the ActionCreateTables job + stubJob := job.Clone() stubJob.Args = make([]any, 1) for i := range args { stubJob.TableID = args[i].ID diff --git a/pkg/disttask/framework/scheduler/scheduler_manager.go b/pkg/disttask/framework/scheduler/scheduler_manager.go index a2f8f8789a708..186fc77702a7d 100644 --- a/pkg/disttask/framework/scheduler/scheduler_manager.go +++ b/pkg/disttask/framework/scheduler/scheduler_manager.go @@ -361,7 +361,7 @@ func (sm *Manager) startScheduler(basicTask *proto.TaskBase, allocateSlots bool, sm.slotMgr.unReserve(basicTask, reservedExecID) } handle.NotifyTaskChange() - sm.logger.Info("task scheduler exist", zap.Int64("task-id", task.ID)) + sm.logger.Info("task scheduler exit", zap.Int64("task-id", task.ID)) }() metrics.UpdateMetricsForRunTask(task) scheduler.ScheduleTask() diff --git a/pkg/session/bootstrap.go b/pkg/session/bootstrap.go index 22af88ed5d3a2..9a44541d6fdf0 100644 --- a/pkg/session/bootstrap.go +++ b/pkg/session/bootstrap.go @@ -1348,7 +1348,8 @@ func checkDistTask(s sessiontypes.Session, ver int64) { // Not set yet. return } else if req.GetRow(0).GetString(0) == variable.On { - logutil.BgLogger().Fatal("check dist task failed, tidb_enable_dist_task is enabled", zap.Error(err)) + logutil.BgLogger().Fatal("cannot upgrade when tidb_enable_dist_task is enabled, "+ + "please set tidb_enable_dist_task to off before upgrade", zap.Error(err)) } // Even if the variable is set to `off`, we still need to check the tidb_global_task.