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

pdutil: use the correct unit for pausing schedulers - #1466

Open
glorv wants to merge 1 commit into
pingcap:masterfrom
glorv:cp-tidb-33545
Open

pdutil: use the correct unit for pausing schedulers#1466
glorv wants to merge 1 commit into
pingcap:masterfrom
glorv:cp-tidb-33545

Conversation

@glorv

@glorvglorv commented Mar 30, 2022

Copy link
Copy Markdown
Collaborator

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

ti-chi-bot commented Mar 30, 2022

Copy link
Copy Markdown
Member

[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.

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

Comment threadpkg/pdutil/pd.go
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
Copy Markdown
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

@nolouchnolouch left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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.

Details

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

glorv commented Mar 30, 2022

Copy link
Copy Markdown
CollaboratorAuthor

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 freeto 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

@glorv@ti-chi-bot@kennytm@nolouch