-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
store/tikv: fix log of sendTxnHeartBeat #21017
store/tikv: fix log of sendTxnHeartBeat #21017
Conversation
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
LGTM |
@@ -874,7 +875,7 @@ func sendTxnHeartBeat(bo *Backoffer, store *tikvStore, primary []byte, startTS, | |||
} | |||
cmdResp := resp.Resp.(*pb.TxnHeartBeatResponse) | |||
if keyErr := cmdResp.GetError(); keyErr != nil { | |||
return 0, errors.Errorf("txn %d heartbeat fail, primary key = %v, err = %s", startTS, primary, keyErr.Abort) | |||
return 0, errors.Errorf("txn %d heartbeat fail, primary key = %v, err = %s", startTS, hex.EncodeToString(primary), extractKeyErr(keyErr)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's better to use prettyWriteKey
to print?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't care what the key represents(a concrete table key or index key) in this case. Hex format is enough and easy for debug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
/lgtm |
/merge |
/run-all-tests |
/merge |
/run-all-tests |
@youjiali1995 merge failed. |
/merge |
/run-all-tests |
@youjiali1995 merge failed. |
/merge |
/run-all-tests |
Signed-off-by: youjiali1995 zlwgx1023@gmail.com
What problem does this PR solve?
Issue Number: close #15654
Problem Summary:
Refine the log of sendTxnHeartBeat.
What is changed and how it works?
What's Changed:
Refine the log of sendTxnHeartBeat.
Related changes
Check List
Tests
Release note