-
Notifications
You must be signed in to change notification settings - Fork 101
err_msg: clarify some ambiguous error message #1076
Conversation
@Zwj-coder: GitHub didn't allow me to request PR reviews from the following users: /cc. Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
Eh, by the way, I have an idea about how to handle this, which might make this PR better. (also cc @3pointer, PTAL) At here: Lines 140 to 141 in b1ed365
The 'unknown error' omits many context, which make it confusing -- users may think this error occurs in the internal of PR. How about add the store into the context? like: return res, errors.Annotatef(berrors.ErrKVUnknown, "error occurs in the TiKV Node %s(@%s): %v",
store.GetID(),
redact.String(store.GetAddress()), // The net address might be sensitive, so we might need to redact them.
errPb) After this, I think, users can notice that this error occurs in TiKV, and we can keep the description of NOTEs: Unfortunately, currently, our Lines 25 to 29 in b1ed365
You may would like to create a type that contains both response and store info, and replace this type to push.respCh <- RespAndStore{
Resp: resp,
Store: store,
} ... at here: Lines 79 to 83 in b1ed365
|
I think since the error stack contains both error message from tikv and br, if the error occur at the tikv side, it's tikv's responsibility to report detailed error message. |
@Zwj-coder Yep, but I think BR can figure out on WHICH TiKV error happens , IMO this could be helpful for debugging. 🤔 |
@YuJuncen I agree, but if the tikv cluster is configured in the same way, one of them have permission problem probably means rest of them also have same problem, so we could add this store help information for debugging usage. |
@Zwj-coder Well, that is true. Even I'm still afraid this message being misleading in some conditions... 😂 |
/lgtm BTW Is |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/run-integration-tests |
pkg/task/common.go
Outdated
if tblFlag := flags.Lookup(flagTable); tblFlag != nil { | ||
tbl := tblFlag.Value.String() | ||
if len(tbl) == 0 { | ||
return errors.Annotate(berrors.ErrInvalidArgument, "empty table name is not allowed") | ||
} | ||
cfg.Tables[tbl] = struct{}{} |
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.
we could have the same tables in different dbs.
It's better to change the key from tbl
to db.tbl
.
/lgtm |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #1131. |
In response to a cherrypick label: new pull request could not be created: failed to create pull request against pingcap/br#release-4.0 from head ti-chi-bot:cherry-pick-1076-to-release-4.0: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-1076-to-release-4.0."}],"documentation_url":"https://docs.github.com/rest/reference/pulls#create-a-pull-request"} |
Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #1132. |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request could not be created: failed to create pull request against pingcap/br#release-5.0 from head ti-chi-bot:cherry-pick-1076-to-release-5.0: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-1076-to-release-5.0."}],"documentation_url":"https://docs.github.com/rest/reference/pulls#create-a-pull-request"} |
* This is an automated cherry-pick of #1076 Signed-off-by: ti-chi-bot <[email protected]> * resolve conflict * resolve conflict Co-authored-by: zhangwenjum <[email protected]>
* improve error message * add debug info * improve tikv unknown error * refomat the error message * add error message test * remove tikv cluster health check * add err * separate storage io error from unknown error * update push.go * update backup/restore summary * add nothing to restore info to summary * update comments * improve error message * add restore table check * add restore table check * update glue * update * using db.table to identify Co-authored-by: 3pointer <[email protected]>
* improve error message * add debug info * improve tikv unknown error * refomat the error message * add error message test * remove tikv cluster health check * add err * separate storage io error from unknown error * update push.go * update backup/restore summary * add nothing to restore info to summary * update comments * improve error message * add restore table check * add restore table check * update glue * update * using db.table to identify Co-authored-by: 3pointer <[email protected]>
What problem does this PR solve?
Keeping improve BR errors and logs #1055
Some error message in BR is ambiguous and misleading.
i.e.
Clarify the summary info including:
data-size => total kv size
size => backup data size(after compressed)
What is changed and how it works?
data-size
field has been changed tototal-kv-size
size
field in backup summary has been changed tobackup data size(after compressed)
size
field in restore summary has been changed torestore data size(after decompressed)
Check List
Tests
Code changes
Release Note