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

[DNM] mcs: refine delete resource group logic to avoid corner case of tiflash #7191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guo-shaoge
Copy link
Contributor

@guo-shaoge guo-shaoge commented Oct 11, 2023

What problem does this PR solve?

Issue Number: Close #7147

What is changed and how does it work?

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.

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 Oct 11, 2023

[REVIEW NOTIFICATION]

This pull request has not been approved.

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 Oct 11, 2023
@ti-chi-bot ti-chi-bot bot requested review from disksing and Yisaer October 11, 2023 12:13
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #7191 (ed1e5c6) into master (3c632b1) will increase coverage by 0.20%.
Report is 20 commits behind head on master.
The diff coverage is 16.66%.

@@            Coverage Diff             @@
##           master    #7191      +/-   ##
==========================================
+ Coverage   74.40%   74.60%   +0.20%     
==========================================
  Files         440      442       +2     
  Lines       47180    47622     +442     
==========================================
+ Hits        35104    35529     +425     
+ Misses       8986     8980       -6     
- Partials     3090     3113      +23     
Flag Coverage Δ
unittests 74.60% <16.66%> (+0.20%) ⬆️

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

@guo-shaoge
Copy link
Contributor Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 13, 2023
@guo-shaoge guo-shaoge changed the title mcs: refine delete resource group logic to avoid corner case of tiflash [DNM] mcs: refine delete resource group logic to avoid corner case of tiflash Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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.

refine delete resource group logic
1 participant