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

server: set timeout for MoveLeader #1533

Merged
merged 4 commits into from
May 16, 2019
Merged

Conversation

disksing
Copy link
Contributor

@disksing disksing commented May 9, 2019

What problem does this PR solve?

When multiple PDs calls MoveLeader, one will succeed and others will block in MoveLeader function.

What is changed and how it works?

Add timeout when calling MoveLeader.

Check List

Tests

  • Integration test

Related changes

  • Need to cherry-pick to the release branch
  • Need to be included in the release notes

Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
@disksing disksing added needs-cherry-pick-release-2.0 The PR needs to cherry pick to release-2.0 branch. needs-cherry-pick-release-2.1 The PR needs to cherry pick to release-2.1 branch. labels May 9, 2019
@disksing disksing requested review from nolouch and rleungx May 9, 2019 04:13
@@ -30,6 +30,9 @@ import (
"go.uber.org/zap"
)

// The timeout to wait transfer etcd leader to complete.
const moveLeaderTimeout = 5 * time.Second
Copy link
Contributor

Choose a reason for hiding this comment

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

can it be configured?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. However, I think 5 seconds is a reasonable value and users are unlikely to need to modify it.

@zhouqiang-cl
Copy link
Contributor

/rebuild

1 similar comment
@disksing
Copy link
Contributor Author

/rebuild

@disksing
Copy link
Contributor Author

port in use.
/rebuild

@disksing
Copy link
Contributor Author

/rebuild

1 similar comment
@disksing
Copy link
Contributor Author

/rebuild

@disksing disksing merged commit 6febb24 into tikv:master May 16, 2019
@disksing disksing deleted the move-leader branch May 16, 2019 05:52
disksing added a commit to oh-my-tidb/pd that referenced this pull request May 16, 2019
* server: set timeout for MoveLeader

Signed-off-by: disksing <i@disksing.com>
nolouch added a commit that referenced this pull request May 23, 2019
* tiny clean up code (#1526)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* config:  enable use region storage by default (#1524)

* config: default enable use region storage

* schedulers: let hot region balance not affect by balance-region-scheduler-limit (#1522)

Signed-off-by: nolouch <nolouch@gmail.com>

* log: do not add stack to error log (#1532)

* *: replace gofail with pingcap/failpoint (#1534)

* *: replace gofail with pingcap/failpoint

Signed-off-by: disksing <i@disksing.com>

* fix typo

Signed-off-by: disksing <i@disksing.com>

* fix typo

Signed-off-by: disksing <i@disksing.com>

* Update server/cluster_test.go

Co-Authored-By: Lonng <chris@lonng.org>

* Update server/tso.go

Co-Authored-By: Lonng <chris@lonng.org>

* Update server/tso.go

Co-Authored-By: Lonng <chris@lonng.org>

* check enable failpoint result

Signed-off-by: disksing <i@disksing.com>

* Update server/cluster.go

Co-Authored-By: Lonng <chris@lonng.org>

* server: set timeout for MoveLeader (#1533)

* server: set timeout for MoveLeader

Signed-off-by: disksing <i@disksing.com>

* client, server: add ScanRegions gRPC protocol support (#1535)

* client, server: support ScanRegions gRPC protocol

Signed-off-by: disksing <i@disksing.com>

* schedule: actively push operator  (#1536)

* schedule: actively push operator

Signed-off-by: nolouch <nolouch@gmail.com>

* *: update some dead links (#1543)

* update links

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* Add windows build script (#1540)

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* fix operator timeout metrics (#1541)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* *:Rollback config in store when kv.persist failed (#1476)

* tests: independent region sync test (#1545)

* tests: independent syncer region test

Signed-off-by: nolouch <nolouch@gmail.com>

* schedule: operator limit for stores (#1474)

* add store limit for scheduling

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* statistic: add the statistic of flow (#1548)

* store_statistic: add the statistic of flow

Signed-off-by: nolouch <nolouch@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-2.0 The PR needs to cherry pick to release-2.0 branch. needs-cherry-pick-release-2.1 The PR needs to cherry pick to release-2.1 branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants