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

refine delete resource group logic #7146

Closed
wants to merge 1 commit into from

Conversation

guo-shaoge
Copy link
Contributor

@guo-shaoge guo-shaoge commented Sep 25, 2023

What problem does this PR solve?

Issue Number: Close #7147

First remove meta info of resource group from memory then remove it from etcd storage.

Why:

  1. tiflash will call PD grpc of GetResourceGroup() to add meta info to itself. GetResourceGroup() only check meta info from memory
  2. tiflash delete resource group info by watching PD etcd
  3. So this can happend:
    1. User delete resource group by SQL
    2. The current implementation of DeleteResourceGroup() first delete info from etcd, so TiFlash watching will be notified, so it delete rg info.
    3. MPPTask that has already been dispatched comes to tiflash, tiflash fetch from PD using GetResourceGroup() successfully
    4. PD remove rg meta info from memory.

What is changed and how does it work?

Check List

Tests

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

Code changes

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

Release note

None.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 25, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • disksing

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. labels Sep 25, 2023
@ti-chi-bot ti-chi-bot bot requested review from disksing and rleungx September 25, 2023 07:56
@ti-chi-bot ti-chi-bot bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 25, 2023
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 7, 2023
@guo-shaoge
Copy link
Contributor Author

#7191

@guo-shaoge guo-shaoge closed this Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refine delete resource group logic
2 participants