Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

pdutil: use the correct unit for pausing schedulers #1466

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

Conversation

glorv
Copy link
Collaborator

@glorv glorv commented Mar 30, 2022

What problem does this PR solve?

ref: pingcap/tidb#33546

What is changed and how it works?

cherry-pick pingcap/tidb#33545 to br

Check List

Tests

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

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Fix the issue that the schedulers won't be resumed after BR/Lightning exits abnormally.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Mar 30, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • kennytm

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.

@@ -365,7 +365,7 @@ func (p *PdController) getStoreInfoWith(

func (p *PdController) doPauseSchedulers(ctx context.Context, schedulers []string, post pdHTTPRequest) ([]string, error) {
// pause this scheduler with 300 seconds
body, err := json.Marshal(pauseSchedulerBody{Delay: int64(pauseTimeout)})
body, err := json.Marshal(pauseSchedulerBody{Delay: int64(pauseTimeout.Seconds())})
Copy link
Collaborator

Choose a reason for hiding this comment

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

or use .Milliseconds() / 1000

@ti-chi-bot ti-chi-bot added the status/LGT1 LGTM1 label Mar 30, 2022
Copy link
Member

@nolouch nolouch left a comment

Choose a reason for hiding this comment

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

lgtm. do we need pick to 6.0?

@ti-chi-bot
Copy link
Member

@nolouch: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

lgtm. do we need pick to 6.0?

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.

@glorv
Copy link
Collaborator Author

glorv commented Mar 30, 2022

lgtm. do we need pick to 6.0?

This is a manually cherry-picked pr as br code with version < 5.2 are still in this repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants