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

*: add HIGH_PRIORITY for the bootstrap SQLs. #7616

Merged
merged 3 commits into from
Sep 5, 2018

Conversation

jackysp
Copy link
Member

@jackysp jackysp commented Sep 5, 2018

What problem does this PR solve?

Some important SQLs could failed when TiDB is starting. This PR try to improve this.

What is changed and how it works?

Add HIGH_PRIORITY for the bootstrap SQLs.

Check List

Tests

  • Manual test (add detailed scripts or steps below)
  1. change the log level to debug, add os.Exit(0) after
    for {
  2. start a cluster with 2 TiDB servers.
  3. check the SQLs in the two log files.

Code changes

  • no

Side effects

  • Possible performance regression

Related changes

  • no

PTAL @winkyao @breeswish

@jackysp jackysp added the type/enhancement The issue or PR belongs to an enhancement. label Sep 5, 2018
@jackysp
Copy link
Member Author

jackysp commented Sep 5, 2018

/run-all-tests

@@ -36,11 +36,11 @@ import (
"math/rand"
"net"
"net/http"
// For pprof
Copy link
Member

Choose a reason for hiding this comment

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

This change is made by gofmt?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.

@XuHuaiyu XuHuaiyu closed this Sep 5, 2018
@XuHuaiyu XuHuaiyu reopened this Sep 5, 2018
@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 5, 2018
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

According to @hicqu , this PR could not solve the problem described in the description.

SQL with HIGH_PRIORITY would not be promised to be executed before the NORMAL_PRIORITY now.

Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

I got it, HIGH_PRIORITY task can be handled in a short time if there are few HIGH_PRIORITY tasks in the task queue, rather than waiting until out of time when be set as NORMAL_PRIORITY.

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 5, 2018
@zz-jason zz-jason merged commit 6e3bbe8 into pingcap:master Sep 5, 2018
@jackysp jackysp deleted the high_priority branch September 7, 2018 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants