-
Notifications
You must be signed in to change notification settings - Fork 409
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
Add some debug friendly utilities for dag request based test framework #4698
Conversation
Signed-off-by: yibin <huyibin@pingcap.com>
[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 submitting an approval review. |
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.
LGTM
for (auto & it : failed_req_msg_vec) | ||
{ | ||
String msg = fmt::format("request {} failed, msg: {}", it.first, it.second); | ||
if (first) | ||
{ | ||
merged_msg = msg; | ||
first = false; | ||
} | ||
else | ||
{ | ||
merged_msg = fmt::format("{}\n{}", merged_msg, msg); | ||
} | ||
} |
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.
How about use FmtBuffer?
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.
Nice sugguestion!
|
||
bool unequal_flag = false; | ||
DAGProperties properties = getDAGProperties(""); | ||
std::__1::vector<std::__1::pair<DecodedTiKVKeyPtr, DecodedTiKVKeyPtr>> key_ranges = CoprocessorHandler::GenCopKeyRange(req.ranges()); |
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.
To satisfy my curiosity, Could you tell me why use the "std::__1" namespace?
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.
Ahoh, they were introduced by CLion's extracting method functionality, I'll change it.
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.
Get.
Signed-off-by: yibin <huyibin@pingcap.com>
@@ -378,28 +378,29 @@ void dbgFuncTiDBQueryFromNaturalDag(Context & context, const ASTs & args, DBGInv | |||
if (!failed_req_msg_vec.empty()) | |||
{ | |||
output("Invalid"); | |||
String merged_msg; | |||
FmtBuffer msg_buffer; |
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.
Sorry, I didn't speak clear that JoinStr function with FmtBuffer can be better
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.
Yeah, that's exactly what I needed. Used joinStr to simplify this process.
Signed-off-by: yibin <huyibin@pingcap.com>
Signed-off-by: yibin <huyibin@pingcap.com>
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.
LGTM
/merge |
@yibin87: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. 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 ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 9daae88
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
Signed-off-by: yibin huyibin@pingcap.com
What problem does this PR solve?
Issue Number: close #4304
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note