diff --git a/ddl/ddl_worker.go b/ddl/ddl_worker.go index 589eac81bc8c2..55836de141c78 100644 --- a/ddl/ddl_worker.go +++ b/ddl/ddl_worker.go @@ -536,13 +536,14 @@ func cleanMDLInfo(pool *sessionPool, jobID int64, ec *clientv3.Client) { sess.SetDiskFullOpt(kvrpcpb.DiskFullOpt_AllowedOnAlmostFull) _, err := sess.execute(context.Background(), sql, "delete-mdl-info") if err != nil { - logutil.BgLogger().Warn("unexpected error when clean mdl info", zap.Error(err)) + logutil.BgLogger().Warn("unexpected error when clean mdl info", zap.Int64("job ID", jobID), zap.Error(err)) + return } if ec != nil { path := fmt.Sprintf("%s/%d/", util.DDLAllSchemaVersionsByJob, jobID) _, err = ec.Delete(context.Background(), path, clientv3.WithPrefix()) if err != nil { - logutil.BgLogger().Warn("[ddl] delete versions failed", zap.Any("job id", jobID), zap.Error(err)) + logutil.BgLogger().Warn("[ddl] delete versions failed", zap.Int64("job ID", jobID), zap.Error(err)) } } }