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
Contributor

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 disksing requested review from nolouch and MyonKeminta May 14, 2019 08:52
disksing added 2 commits May 14, 2019 19:34
Signed-off-by: disksing <[email protected]>
Signed-off-by: disksing <[email protected]>
@disksing disksing marked this pull request as ready for review May 14, 2019 11:51
@disksing disksing added the DNM label May 14, 2019
@codecov-io
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 disksing removed the DNM label May 16, 2019
@MyonKeminta
Copy link
Contributor

Rest LGTM

disksing added 2 commits May 16, 2019 20:13
Signed-off-by: disksing <[email protected]>
Signed-off-by: disksing <[email protected]>
Copy link
Contributor

@MyonKeminta MyonKeminta left a comment

Choose a reason for hiding this comment

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

LGTM

@MyonKeminta
Copy link
Contributor

/test

@disksing
Copy link
Contributor Author

/rebuild

@disksing disksing merged commit 65eb45a into tikv:master May 17, 2019
@disksing disksing deleted the scan-region branch May 17, 2019 04:02
nolouch added a commit that referenced this pull request May 23, 2019
* tiny clean up code (#1526)

Signed-off-by: Ryan Leung <[email protected]>

* 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 <[email protected]>

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

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

* *: replace gofail with pingcap/failpoint

Signed-off-by: disksing <[email protected]>

* fix typo

Signed-off-by: disksing <[email protected]>

* fix typo

Signed-off-by: disksing <[email protected]>

* Update server/cluster_test.go

Co-Authored-By: Lonng <[email protected]>

* Update server/tso.go

Co-Authored-By: Lonng <[email protected]>

* Update server/tso.go

Co-Authored-By: Lonng <[email protected]>

* check enable failpoint result

Signed-off-by: disksing <[email protected]>

* Update server/cluster.go

Co-Authored-By: Lonng <[email protected]>

* server: set timeout for MoveLeader (#1533)

* server: set timeout for MoveLeader

Signed-off-by: disksing <[email protected]>

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

* client, server: support ScanRegions gRPC protocol

Signed-off-by: disksing <[email protected]>

* schedule: actively push operator  (#1536)

* schedule: actively push operator

Signed-off-by: nolouch <[email protected]>

* *: update some dead links (#1543)

* update links

Signed-off-by: Ryan Leung <[email protected]>

* Add windows build script (#1540)

Signed-off-by: Ana Hobden <[email protected]>

* fix operator timeout metrics (#1541)

Signed-off-by: Ryan Leung <[email protected]>

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

* tests: independent region sync test (#1545)

* tests: independent syncer region test

Signed-off-by: nolouch <[email protected]>

* schedule: operator limit for stores (#1474)

* add store limit for scheduling

Signed-off-by: Ryan Leung <[email protected]>

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

* store_statistic: add the statistic of flow

Signed-off-by: nolouch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants