-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
sig/executionSIG executionSIG executionsig/transactionSIG:TransactionSIG:Transactiontype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Bug Report
TiDB will report and log an error message if it detects data inconsistencies, but it only logs the index name. We don't know the table name! For example,
Lines 1215 to 1223 in b7c22aa
| logutil.Logger(ctx).Error("inconsistent index handles", 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))), | |
| zap.String("total_handles", fmt.Sprint(task.handles))) | |
| // table scan in double read can never has conditions according to convertToIndexScan. | |
| // if this table scan has no condition, the number of rows it returns must equal to the length of handles. | |
| return errors.Errorf("inconsistent index %s handle count %d isn't equal to value count %d", | |
| w.idxLookup.index.Name.O, handleCnt, len(task.rows)) |
TiDB should log enough information.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
sig/executionSIG executionSIG executionsig/transactionSIG:TransactionSIG:Transactiontype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.