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

distask: fix panic on refresh task fails or returns nil #47525

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

D3Hunter
Copy link
Contributor

@D3Hunter D3Hunter commented Oct 10, 2023

What problem does this PR solve?

Issue Number: close #47520

Problem Summary:

What is changed and how it works?

fix panic on refresh task fails or returns nil which makes dispatcher.Task nil
move delRunningTask of manager into defer

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    return nil, nil, nil, err, task, nil on GetGlobalTaskByID, check dispatcher.Task is always not nil, and updated correctly.
  • No need to test
    • I checked and no code files have been changed.

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

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 10, 2023
@tiprow
Copy link

tiprow bot commented Oct 10, 2023

Hi @D3Hunter. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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 kubernetes/test-infra repository.

@D3Hunter
Copy link
Contributor Author

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Oct 10, 2023
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 10, 2023
@D3Hunter
Copy link
Contributor Author

/test all

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #47525 (892007f) into master (379ea38) will increase coverage by 0.6053%.
Report is 7 commits behind head on master.
The diff coverage is 71.4285%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #47525        +/-   ##
================================================
+ Coverage   72.1648%   72.7702%   +0.6053%     
================================================
  Files          1354       1375        +21     
  Lines        401299     407650      +6351     
================================================
+ Hits         289597     296648      +7051     
+ Misses        92402      92176       -226     
+ Partials      19300      18826       -474     
Flag Coverage Δ
integration 39.5560% <0.0000%> (?)
unit 72.1514% <71.4285%> (-0.0135%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9913% <ø> (ø)
parser 84.6969% <ø> (+0.0287%) ⬆️
br 48.8568% <ø> (-4.3366%) ⬇️

@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: okJiang, ywqzzy

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 11, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 11, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-10 09:49:29.745663795 +0000 UTC m=+1132167.332773940: ☑️ agreed by ywqzzy.
  • 2023-10-11 05:50:14.129101286 +0000 UTC m=+1204211.716211416: ☑️ agreed by okJiang.

@ti-chi-bot ti-chi-bot bot merged commit b8996da into pingcap:master Oct 11, 2023
12 of 16 checks passed
@D3Hunter D3Hunter deleted the fix-panic branch October 11, 2023 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dispatcher panic on close and fails to restart for the task
3 participants