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

disttask: fix removing meta when met network partition for so long then recover from it #48005

Merged
merged 5 commits into from
Oct 27, 2023

Conversation

ywqzzy
Copy link
Contributor

@ywqzzy ywqzzy commented Oct 26, 2023

What problem does this PR solve?

Issue Number: close #47954

Problem Summary:
When a prolonged encounter network partition, the dist task framework may have chance to remove meta for the tidb node.
When the tidb node recovers from the network partition, the meta loss.
Then dispatcher may has chance to detect no available nodes to dispatch subtasks.

What is changed and how it works?

Add recoverMetaLoop which inits and recovers dist_framework_meta for the tidb node running the scheduler manager.
This is necessary when the TiDB node experiences a prolonged network partition and the dispatcher deletes dist_framework_meta. When the TiDB node recovers from the network partition, we need to re-insert the metadata.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.
image

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.

enhance distributed task framework when it meets prolonged network partitions.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked 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 Oct 26, 2023
@tiprow
Copy link

tiprow bot commented Oct 26, 2023

Hi @ywqzzy. 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.

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #48005 (631a2b7) into master (a565692) will increase coverage by 1.1862%.
Report is 3 commits behind head on master.
The diff coverage is 93.6170%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #48005        +/-   ##
================================================
+ Coverage   71.6308%   72.8171%   +1.1862%     
================================================
  Files          1401       1424        +23     
  Lines        405726     412131      +6405     
================================================
+ Hits         290625     300102      +9477     
+ Misses        95317      93142      -2175     
+ Partials      19784      18887       -897     
Flag Coverage Δ
integration 42.1520% <78.7234%> (?)
unit 71.6449% <91.3043%> (+0.0141%) ⬆️

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

Components Coverage Δ
dumpling 53.9913% <ø> (ø)
parser ∅ <ø> (∅)
br 48.7987% <ø> (-4.2151%) ⬇️

@ywqzzy
Copy link
Contributor Author

ywqzzy commented Oct 26, 2023

/retest

@tiprow
Copy link

tiprow bot commented Oct 26, 2023

@ywqzzy: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Oct 27, 2023
@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. and removed do-not-merge/needs-triage-completed labels Oct 27, 2023
Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

LGTM
There may be some gap in expiration time with serverInfo.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 27, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tangenta, zimulala

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 27, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 27, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-27 02:41:19.619216782 +0000 UTC m=+2575277.206326924: ☑️ agreed by zimulala.
  • 2023-10-27 03:10:18.343618104 +0000 UTC m=+2577015.930728248: ☑️ agreed by tangenta.

@ti-chi-bot ti-chi-bot bot merged commit 9224f62 into pingcap:master Oct 27, 2023
13 of 16 checks passed
@ti-chi-bot
Copy link
Member

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

ti-chi-bot bot pushed a commit that referenced this pull request Oct 27, 2023
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-7.5 Should cherry pick this PR to release-7.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

add index status was always running after inject ddl owner network partition
4 participants