Skip to content
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

Merged
merged 6 commits into from
Apr 25, 2024

Conversation

CalvinNeo
Copy link
Member

What problem does this PR solve?

Issue Number: close #8988

Problem Summary:

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

Signed-off-by: CalvinNeo <[email protected]>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 25, 2024
@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. label Apr 25, 2024
@CalvinNeo
Copy link
Member Author

@purelind
Copy link
Collaborator

/check-issue-triage-complete

Comment on lines 894 to 895
eventuallyPredicate(
[&]() { return fap_context->tasks_trace->queryState(region_id) == FAPAsyncTasks::TaskState::NotScheduled; });
Copy link
Contributor

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?

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);
}

Copy link
Member Author

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]>
@CalvinNeo CalvinNeo requested a review from JaySon-Huang April 25, 2024 10:59
@JaySon-Huang
Copy link
Contributor

/run-all-tests

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Apr 25, 2024
Copy link
Contributor

ti-chi-bot bot commented Apr 25, 2024

[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:
  • OWNERS [JaySon-Huang,Lloyd-Pottiger]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Apr 25, 2024
Copy link
Contributor

ti-chi-bot bot commented Apr 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-25 14:27:58.655878491 +0000 UTC m=+270435.395781399: ☑️ agreed by Lloyd-Pottiger.
  • 2024-04-25 15:32:12.859965418 +0000 UTC m=+274289.599868329: ☑️ agreed by JaySon-Huang.

@ti-chi-bot ti-chi-bot bot merged commit b77839b into pingcap:master Apr 25, 2024
6 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #8992.

ti-chi-bot bot pushed a commit that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FAP: Panic when a task throws without generate any result
5 participants