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: add test for creating evict-leader-scheduler twice #8757

Merged
merged 12 commits into from
Nov 21, 2024

Conversation

okJiang
Copy link
Member

@okJiang okJiang commented Oct 31, 2024

What problem does this PR solve?

Issue Number: Close #8756

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

Signed-off-by: okJiang <[email protected]>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed dco-signoff: yes Indicates the PR's author has signed the dco. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 31, 2024
Signed-off-by: okJiang <[email protected]>
@okJiang
Copy link
Member Author

okJiang commented Oct 31, 2024

/retest

@okJiang
Copy link
Member Author

okJiang commented Oct 31, 2024

/test pull-integration-realcluster-test

Test passed, trigger second test

Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.

Project coverage is 75.22%. Comparing base (76e3b43) to head (bc1ad24).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8757      +/-   ##
==========================================
- Coverage   75.24%   75.22%   -0.03%     
==========================================
  Files         456      458       +2     
  Lines       71608    71694      +86     
==========================================
+ Hits        53884    53930      +46     
- Misses      14295    14330      +35     
- Partials     3429     3434       +5     
Flag Coverage Δ
unittests 75.22% <28.57%> (-0.03%) ⬇️

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

---- 🚨 Try these New Features:

Signed-off-by: okJiang <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. do-not-merge/needs-triage-completed labels Nov 1, 2024
@okJiang
Copy link
Member Author

okJiang commented Nov 5, 2024

Grant-leader exists bug. It will not work in some specific conditions... I have to find it firstly. So this pr hold

@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 Nov 8, 2024
Copy link
Contributor

ti-chi-bot bot commented Nov 8, 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.

@okJiang
Copy link
Member Author

okJiang commented Nov 19, 2024

/test pull-integration-realcluster-test

@okJiang
Copy link
Member Author

okJiang commented Nov 19, 2024

Grant-leader exists bug. It will not work in some specific conditions... I have to find it firstly. So this pr hold

The issue has been fixed by https://github.com/tikv/pd/pull/8623/files#diff-a220672e83f3e5fa65303ae268e69c0e4bcabebd6d3b5d1c81898504f9ac5095R496-R503.

Assuming there are three nodes: store0, store1, and store2, we set up scheduler add grant-leader-scheduler store0.

Then, when the balance-leader-scheduler selects a target, it cannot be store0, but it may choose store1 or store2. Let's assume target=store1. Ultimately, when creating the transfer-leader-operator for the target, there will be no filtering on the source, which leads to the creation of a transfer-leader-operator from store0 to store1.

This is a grant-leader-scheduler problem. So we do not need to pick it to previous versions.

@okJiang
Copy link
Member Author

okJiang commented Nov 19, 2024

/retest

@ti-chi-bot ti-chi-bot bot removed the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 19, 2024
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Nov 20, 2024
Comment on lines +224 to +226
if i == 1 {
time.Sleep(3 * time.Second)
}
Copy link
Member

Choose a reason for hiding this comment

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

I think we should cover this kind of waiting inside the testutil.Eventually below.

Comment on lines +251 to +253
if i == 1 {
time.Sleep(3 * time.Second)
}
Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

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

ti-chi-bot bot commented Nov 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JmPotato, lhy1024

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 20, 2024
Copy link
Contributor

ti-chi-bot bot commented Nov 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-20 02:34:33.260066929 +0000 UTC m=+1014835.450935921: ☑️ agreed by lhy1024.
  • 2024-11-20 13:28:27.188908181 +0000 UTC m=+38294.808562697: ☑️ agreed by JmPotato.

@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 21, 2024
@okJiang
Copy link
Member Author

okJiang commented Nov 21, 2024

/retest

@okJiang
Copy link
Member Author

okJiang commented Nov 21, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit 90cc61b into tikv:master Nov 21, 2024
23 of 25 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Nov 21, 2024
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Nov 21, 2024
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Nov 21, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Nov 21, 2024
@ti-chi-bot
Copy link
Member

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

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 needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Evict-leader-scheduler dosen't work when creating it with the same store-id repeatedly
4 participants