diff --git a/executor/distsql.go b/executor/distsql.go index 240d79d6f0014..5e83a63d8f9b1 100644 --- a/executor/distsql.go +++ b/executor/distsql.go @@ -1213,7 +1213,7 @@ func (w *tableWorker) executeTask(ctx context.Context, task *lookupTableTask) er } logutil.Logger(ctx).Error("inconsistent index handles", - zap.String("table_name", task.partitionTable.Meta().Name.O), + zap.String("table_name", w.idxLookup.index.Table.O), zap.String("index", w.idxLookup.index.Name.O), zap.Int("index_cnt", handleCnt), zap.Int("table_cnt", len(task.rows)), zap.String("missing_handles", fmt.Sprint(GetLackHandles(task.handles, obtainedHandlesMap))),