-
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 exception in FAP worker #8989
Conversation
Signed-off-by: CalvinNeo <[email protected]>
/check-issue-triage-complete |
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
eventuallyPredicate( | ||
[&]() { return fap_context->tasks_trace->queryState(region_id) == FAPAsyncTasks::TaskState::NotScheduled; }); |
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.
Seems this test does not go through the logic of prev_state == FAPAsyncTasks::TaskState::Finished
?
tiflash/dbms/src/Storages/KVStore/MultiRaft/Disagg/FastAddPeerContext.cpp
Lines 247 to 270 in 4bfa40d
RUNTIME_CHECK_MSG( | |
prev_state != FAPAsyncTasks::TaskState::Running && prev_state != FAPAsyncTasks::TaskState::InQueue, | |
"FastAddPeer: find scheduled fap task, region_id={} fap_state={} is_regular_snapshot={}", | |
region_id, | |
magic_enum::enum_name(prev_state), | |
is_regular_snapshot); | |
if (prev_state == FAPAsyncTasks::TaskState::Finished) | |
{ | |
bool is_exception = false; | |
try | |
{ | |
tasks_trace->fetchResult(region_id); | |
} | |
catch (...) | |
{ | |
is_exception = true; | |
} | |
LOG_INFO( | |
log, | |
"FastAddPeer: clean finished result region_id={} is_regular_snapshot={} is_exception={}", | |
region_id, | |
is_regular_snapshot, | |
is_exception); | |
} |
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.
Yes you are right, actually the code can't pass ut.... fixed.
Signed-off-by: CalvinNeo <[email protected]>
/run-all-tests |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JaySon-Huang, 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:
|
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #8988
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note