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

scheduler: replace pauseLeader with two flags and add source filter to transferIn #8623

Merged
merged 11 commits into from
Nov 11, 2024

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Sep 13, 2024

What problem does this PR solve?

Issue Number: Close #8621

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    Before this pr:
    image
    After this pr:
    image

Release note

None.

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 13, 2024
Signed-off-by: lhy1024 <[email protected]>
Copy link

codecov bot commented Sep 13, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 21 lines in your changes missing coverage. Please review.

Project coverage is 75.60%. Comparing base (49307e2) to head (3937ca4).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8623      +/-   ##
==========================================
- Coverage   75.62%   75.60%   -0.02%     
==========================================
  Files         461      461              
  Lines       72310    72351      +41     
==========================================
+ Hits        54683    54701      +18     
- Misses      14128    14147      +19     
- Partials     3499     3503       +4     
Flag Coverage Δ
unittests 75.60% <75.00%> (-0.02%) ⬇️

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

@@ -137,8 +137,10 @@ type StoreSetInformer interface {

// StoreSetController is used to control stores' status.
type StoreSetController interface {
PauseLeaderTransfer(id uint64) error
ResumeLeaderTransfer(id uint64)
PauseLeaderTransferIn(id uint64) error
Copy link
Member

Choose a reason for hiding this comment

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

How about adding a parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it something like PauseLeaderTransferIn(id uint64, d direction) error

Copy link
Member

Choose a reason for hiding this comment

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

yes, WDYT?

// pauseAndResumeLeaderTransfer checks the old and new store IDs, and pause or resume the leader transfer.
func pauseAndResumeLeaderTransfer[T any](cluster *core.BasicCluster, old, new map[uint64]T) {
// pauseAndResumeLeaderTransferIn checks the old and new store IDs, and pause or resume the leader transfer in.
func pauseAndResumeLeaderTransferIn[T any](cluster *core.BasicCluster, old, new map[uint64]T) {
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 23, 2024
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 23, 2024
@lhy1024 lhy1024 requested a review from rleungx September 25, 2024 02:22
@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 4, 2024
Copy link
Contributor

ti-chi-bot bot commented Oct 4, 2024

PR needs rebase.

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-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 22, 2024
@lhy1024 lhy1024 removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 23, 2024
@lhy1024
Copy link
Contributor Author

lhy1024 commented Oct 23, 2024

PTAL @rleungx

@ti-chi-bot ti-chi-bot bot added the lgtm label Nov 11, 2024
Copy link
Contributor

ti-chi-bot bot commented Nov 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Nov 11, 2024
@ti-chi-bot ti-chi-bot bot added the approved label Nov 11, 2024
Copy link
Contributor

ti-chi-bot bot commented Nov 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-22 09:02:50.520410392 +0000 UTC m=+341771.217201021: ☑️ agreed by okJiang.
  • 2024-11-11 06:21:06.217206692 +0000 UTC m=+250828.408075689: ☑️ agreed by rleungx.

@lhy1024
Copy link
Contributor Author

lhy1024 commented Nov 11, 2024

/test pull-integration-realcluster-test

@rleungx
Copy link
Member

rleungx commented Nov 11, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit 8bc9749 into tikv:master Nov 11, 2024
25 checks passed
@okJiang
Copy link
Member

okJiang commented Nov 19, 2024

link #8757 (comment)

okJiang added a commit to okJiang/pd that referenced this pull request Nov 19, 2024
…filter to transferIn (tikv#8623)"

This reverts commit 8bc9749.

Signed-off-by: okJiang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scheduler: there is no source filter in transferIn
3 participants