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

cluster, schedule: unify the scheduling halt to decouple dependencies #6569

Merged
merged 5 commits into from
Jun 8, 2023

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Jun 7, 2023

What problem does this PR solve?

Issue Number: ref #5839. As the comment #6498 (comment) said, unify the scheduling halt to decouple dependencies between cluster and coordinator.

What is changed and how does it work?

Unify the scheduling halt to decouple dependencies between `cluster` and `coordinator`.

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@JmPotato JmPotato added component/schedule Scheduling logic. component/config Configuration logic. component/cluster Cluster logic. labels Jun 7, 2023
@JmPotato JmPotato requested review from nolouch and rleungx June 7, 2023 08:16
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 7, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • rleungx

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 the release-note-none Denotes a PR that doesn't merit a release note. label Jun 7, 2023
Signed-off-by: JmPotato <ghzpotato@gmail.com>
pkg/schedule/coordinator.go Outdated Show resolved Hide resolved
Signed-off-by: JmPotato <ghzpotato@gmail.com>
// SetHaltScheduling set HaltScheduling.
func (o *PersistOptions) SetHaltScheduling(halt bool) {
func (o *PersistOptions) SetHaltScheduling(halt bool, source string) {
Copy link
Member

Choose a reason for hiding this comment

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

Does it need to be persisted?

Copy link
Member Author

Choose a reason for hiding this comment

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

Though it's only used for the metrics and may be lost due to the crash, it's OK for me not to persist it in the PD. WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

It's ok to me.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Patch coverage: 73.07% and project coverage change: -0.02 ⚠️

Comparison is base (026ddf0) 74.61% compared to head (94932ed) 74.59%.

❗ Current head 94932ed differs from pull request most recent head 836905d. Consider uploading reports for the commit 836905d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6569      +/-   ##
==========================================
- Coverage   74.61%   74.59%   -0.02%     
==========================================
  Files         416      417       +1     
  Lines       42576    42578       +2     
==========================================
- Hits        31769    31762       -7     
- Misses       7995     8012      +17     
+ Partials     2812     2804       -8     
Flag Coverage Δ
unittests 74.59% <73.07%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
server/cluster/cluster.go 81.32% <ø> (-0.06%) ⬇️
server/cluster/metrics.go 100.00% <ø> (ø)
server/cluster/cluster_worker.go 66.94% <20.00%> (+0.27%) ⬆️
server/config/persist_options.go 91.94% <75.00%> (+0.50%) ⬆️
pkg/schedule/coordinator.go 72.41% <80.00%> (-0.31%) ⬇️
pkg/unsaferecovery/unsafe_recovery_controller.go 82.71% <100.00%> (-0.26%) ⬇️
server/config/metrics.go 100.00% <100.00%> (ø)

... and 33 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 8, 2023
@nolouch
Copy link
Contributor

nolouch commented Jun 8, 2023

/merge

@JmPotato JmPotato added the require-LGT1 Indicates that the PR requires an LGTM. label Jun 8, 2023
@JmPotato
Copy link
Member Author

JmPotato commented Jun 8, 2023

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 8, 2023

@JmPotato: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 8, 2023

This pull request has been accepted and is ready to merge.

Commit hash: 94932ed

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 8, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 8, 2023

@JmPotato: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot merged commit a5d76c6 into tikv:master Jun 8, 2023
@JmPotato JmPotato deleted the unify_halt branch June 8, 2023 12:21
rleungx pushed a commit to rleungx/pd that referenced this pull request Dec 1, 2023
…tikv#6569)

ref tikv#5839

Unify the scheduling halt to decouple dependencies between `cluster` and `coordinator`.

Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/cluster Cluster logic. component/config Configuration logic. component/schedule Scheduling logic. release-note-none Denotes a PR that doesn't merit a release note. require-LGT1 Indicates that the PR requires an LGTM. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants