store/tikv: print log when resolve lock rollback keys (#18736)
when the metric resolve lock is high, this log makes the debug process easier
This commit is contained in:
@ -598,6 +598,8 @@ func (lr *LockResolver) resolveLock(bo *Backoffer, l *Lock, status TxnStatus, li
|
||||
}
|
||||
if status.IsCommitted() {
|
||||
lreq.CommitVersion = status.CommitTS()
|
||||
} else {
|
||||
logutil.BgLogger().Info("resolveLock rollback", zap.String("lock", l.String()))
|
||||
}
|
||||
|
||||
if resolveLite {
|
||||
@ -605,9 +607,6 @@ func (lr *LockResolver) resolveLock(bo *Backoffer, l *Lock, status TxnStatus, li
|
||||
// prevent from scanning the whole region in this case.
|
||||
tikvLockResolverCountWithResolveLockLite.Inc()
|
||||
lreq.Keys = [][]byte{l.Key}
|
||||
if !status.IsCommitted() {
|
||||
logutil.BgLogger().Info("resolveLock rollback", zap.String("lock", l.String()))
|
||||
}
|
||||
}
|
||||
req := tikvrpc.NewRequest(tikvrpc.CmdResolveLock, lreq)
|
||||
resp, err := lr.store.SendReq(bo, req, loc.Region, readTimeoutShort)
|
||||
|
||||
Reference in New Issue
Block a user