[Log] Optimize delete error message (#6187)
## Proposed changes When a delete error occurs, the error message is ambiguous. ```sql mysql> DELETE FROM nebula_trade_health_trade PARTITION q3_2021 WHERE event_day = '20210706'; ERROR 1064 (HY000): errCode = 2, detailMessage = failed to execute delete. transaction id 7215554, timeout(ms) 160000, unfinished replicas: 4718319=7345841 ``` We do not know the meaning of `4718319=7345841`. Actually the former is `BackendId` and the latter is `TabletId`. I'll add an instruction here to help locate the problem quickly. The error message will be ```sql ERROR 1064 (HY000): errCode = 2, detailMessage = failed to execute delete. transaction id 7215554, timeout(ms) 160000, unfinished replicas [BackendId=TabletId]: 4718319=7345841 ```
This commit is contained in:
@ -284,7 +284,7 @@ public class DeleteHandler implements Writable {
|
||||
// only show at most 5 results
|
||||
List<Entry<Long, Long>> subList = unfinishedMarks.subList(0, Math.min(unfinishedMarks.size(), 5));
|
||||
if (!subList.isEmpty()) {
|
||||
errMsg = "unfinished replicas: " + Joiner.on(", ").join(subList);
|
||||
errMsg = "unfinished replicas [BackendId=TabletId]: " + Joiner.on(", ").join(subList);
|
||||
}
|
||||
LOG.warn(errMsg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user