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

client, server: add ScanRegions gRPC protocol support #1535

Merged
merged 10 commits into from May 17, 2019

Conversation

@disksing
Copy link
Member

disksing commented May 14, 2019

What problem does this PR solve?

There are use cases need to iterate all PD regions (for example TiDB resolveLock). It is too slow to query regions one by one.

What is changed and how it works?

Add ScanRegions gRPC method to query regions in batch.

Note: Merge after pingcap/kvproto#396

Check List

Tests

  • Unit test
  • Integration test

Side effects

  • Possible performance regression

Related changes

  • Need to be included in the release notes
disksing added 2 commits May 14, 2019
Signed-off-by: disksing <i@disksing.com>
add test
Signed-off-by: disksing <i@disksing.com>
@disksing disksing requested review from nolouch and MyonKeminta May 14, 2019
disksing added 2 commits May 14, 2019
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
@disksing disksing marked this pull request as ready for review May 14, 2019
@disksing disksing added the DNM label May 14, 2019
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented May 14, 2019

Codecov Report

Merging #1535 into master will increase coverage by 0.22%.
The diff coverage is 63.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1535      +/-   ##
==========================================
+ Coverage   67.46%   67.69%   +0.22%     
==========================================
  Files         158      158              
  Lines       15659    15689      +30     
==========================================
+ Hits        10565    10620      +55     
+ Misses       4130     4102      -28     
- Partials      964      967       +3
Impacted Files Coverage Δ
client/client.go 67.98% <61.11%> (-0.06%) ⬇️
server/grpc_service.go 59.82% <66.66%> (+1.51%) ⬆️
pkg/testutil/operator_check.go 72.22% <0%> (-11.12%) ⬇️
server/namespace_cluster.go 81.81% <0%> (-3.9%) ⬇️
server/handler.go 54.96% <0%> (-0.51%) ⬇️
server/tso.go 76.59% <0%> (+2.12%) ⬆️
server/util.go 75.49% <0%> (+4.63%) ⬆️
server/coordinator.go 84.7% <0%> (+6.66%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 431c789...8e7a2b3. Read the comment docs.

disksing added 2 commits May 16, 2019
Signed-off-by: disksing <i@disksing.com>
@disksing disksing removed the DNM label May 16, 2019
@MyonKeminta

This comment has been minimized.

Copy link
Contributor

MyonKeminta commented May 16, 2019

Rest LGTM

disksing added 2 commits May 16, 2019
Signed-off-by: disksing <i@disksing.com>
disksing added 2 commits May 16, 2019
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Copy link
Contributor

MyonKeminta left a comment

LGTM

@MyonKeminta

This comment has been minimized.

Copy link
Contributor

MyonKeminta commented May 16, 2019

/test

@disksing

This comment has been minimized.

Copy link
Member Author

disksing commented May 17, 2019

/rebuild

@disksing disksing merged commit 65eb45a into pingcap:master May 17, 2019
5 checks passed
5 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci/build Jenkins job succeeded.
Details
idc-jenkins-ci/test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
@disksing disksing deleted the disksing:scan-region branch May 17, 2019
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
Projects
None yet
4 participants
You can’t perform that action at this time.