-
Notifications
You must be signed in to change notification settings - Fork 411
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
KVStore: Fix test of async tasks #8928
Conversation
Signed-off-by: CalvinNeo <[email protected]>
buffer.joinStr( | ||
query_info.bypass_lock_ts->begin(), | ||
query_info.bypass_lock_ts->end(), | ||
[](const auto & v, FmtBuffer & f) { f.fmtAppend("{}", v); }, | ||
"|"); |
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.
[v, v, v, ...]
seems more clear?
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.
"," is used outside
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.
do not have []
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.
Why not fmt::format("{}", *bypass_lock_ts)
directly.
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.
"," is used outside
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.
Elements of a vector/set will be enclosed by []
.
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.
fixed
FmtBuffer buffer; | ||
buffer.append("ids="); | ||
buffer.joinStr( | ||
ids.begin(), | ||
ids.end(), | ||
[](const auto & v, FmtBuffer & f) { f.fmtAppend("{}", v); }, | ||
"|"); | ||
buffer.append(" locks="); | ||
buffer.joinStr( | ||
region_locks.begin(), | ||
region_locks.end(), | ||
[](const auto & v, FmtBuffer & f) { f.fmtAppend("{}({})", v.first, v.second->DebugString()); }, | ||
"|"); |
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.
ditto
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 can implement a fmt::formatter
for std:: pair<RegionID, LockInfoPtr>
, element type of region_locks
. This way, this function can be simplified as follows:
fmt::format("ids={}, locks={}", ids, region_locks);
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.
Will fix it in later pr
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
/run-all-tests |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JinheLin, Lloyd-Pottiger The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/hold |
Signed-off-by: CalvinNeo <[email protected]>
/run-all-tests |
/unhold |
Signed-off-by: CalvinNeo <[email protected]>
/run-all-tests |
|
/run-integration-test |
|
What problem does this PR solve?
Issue Number: close #8926
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note