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

Fix AsyncTasks cancel deadlock #8953

Merged
merged 10 commits into from
Apr 17, 2024
Merged

Conversation

CalvinNeo
Copy link
Member

@CalvinNeo CalvinNeo commented Apr 17, 2024

What problem does this PR solve?

Issue Number: close #8952

Problem Summary:
See the details in #8952 (comment)

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]>
z
Signed-off-by: CalvinNeo <[email protected]>
a
Signed-off-by: CalvinNeo <[email protected]>
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/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 17, 2024
a
Signed-off-by: CalvinNeo <[email protected]>
LOG_INFO(Logger::get(), "Shutdown SharedContextDisagg");
if (fap_context)
{
fap_context->shutdown();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we call fap_context.reset() after shutdown?

Copy link
Member Author

@CalvinNeo CalvinNeo Apr 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not necessary. IMO, We don't need to eagerly reclaim the fap_context, we just need to eagerly join all workers in AsyncTasks.

CalvinNeo and others added 3 commits April 17, 2024 12:42
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

ti-chi-bot bot commented Apr 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, JinheLin

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,JinheLin]

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 17, 2024
Copy link
Contributor

ti-chi-bot bot commented Apr 17, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-17 06:13:47.387620432 +0000 UTC m=+405046.498666882: ☑️ agreed by JaySon-Huang.
  • 2024-04-17 06:39:03.420797069 +0000 UTC m=+406562.531843519: ☑️ agreed by JinheLin.

@CalvinNeo
Copy link
Member Author

/run-all-tests

z
Signed-off-by: CalvinNeo <[email protected]>
@CalvinNeo
Copy link
Member Author

/run-all-tests

@ti-chi-bot ti-chi-bot bot merged commit 14a1278 into pingcap:master Apr 17, 2024
6 checks passed
@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 18, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Apr 18, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved component/storage 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KVStore: Fix AsyncTasksTest.Cancel1 deadlock
4 participants