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

api,pd-ctl: support endKey in ScanRegions http interface #4400

Open
6 of 8 tasks
Tracked by #28330
IcePigZDB opened this issue Nov 29, 2021 · 0 comments
Open
6 of 8 tasks
Tracked by #28330

api,pd-ctl: support endKey in ScanRegions http interface #4400

IcePigZDB opened this issue Nov 29, 2021 · 0 comments
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@IcePigZDB
Copy link
Contributor

IcePigZDB commented Nov 29, 2021

Development Task

Tracking Issue: pingcap/tidb/pull/28330

Support endKey in http interface regions/key and adjust the pdctl region command region startKey to region keysaccordingly. This is originally proposed as a precondition of the push down optimisation of infomation_schema.tikv_region_status.

Previous code is involved in v5.4.0.
In the current implementation of scanRegions , the default limit is defaultRegionLimit(16) without endkey and noRegionLimit(-1) with endkey.

Use this command to query all Regions in a given range [startkey, endkey). It supports range without endKey, the default value of limit is 16 without endKey and -1 (no limit) with endKey.

  • When one try to use startKey = a, endKey = "" try to get all regions in [a, ), the default limit is defaultRegionLimit(16), need to set limit = -1 to get all regions, this is inconsistent with the case where endKey is not empty.
  • No default limit when using pd-ctl to query endKey may cause a lot of network IO cost.

For these two reasons, tend to set the default limit with endKey to defaultRegionLimit(16) the same as without endKey. One can set limit = -1 to get all regions.

@IcePigZDB IcePigZDB added the type/enhancement The issue or PR belongs to an enhancement. label Nov 29, 2021
IcePigZDB added a commit to IcePigZDB/pd that referenced this issue Nov 29, 2021
ref tikv#4400
Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
IcePigZDB added a commit to IcePigZDB/pd that referenced this issue Nov 29, 2021
ref tikv#4400
Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
IcePigZDB added a commit to IcePigZDB/pd that referenced this issue Nov 29, 2021
ref tikv#4400
Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
IcePigZDB added a commit to IcePigZDB/pd that referenced this issue Nov 29, 2021
ref tikv#4400
Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
IcePigZDB added a commit to IcePigZDB/pd that referenced this issue Nov 29, 2021
ref tikv#4400
Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
IcePigZDB added a commit to IcePigZDB/pd that referenced this issue Nov 29, 2021
ref tikv#4400

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
ti-chi-bot pushed a commit that referenced this issue Nov 29, 2021
…in relevant pdctl command (#4371)

* api: formate scanRegions comment

ref #4400

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>

* pdctl: fix a index out of range bug in relevant pdctl command

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
IcePigZDB added a commit to IcePigZDB/docs that referenced this issue Nov 29, 2021
ref #tikv/pd/issues/4400

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
IcePigZDB added a commit to IcePigZDB/pd that referenced this issue Feb 24, 2022
ref: tikv#4400
Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
ti-chi-bot added a commit that referenced this issue Mar 2, 2022
ref #4400

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/docs that referenced this issue May 13, 2022
ref #tikv/pd/issues/4400

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
ti-chi-bot pushed a commit to ti-chi-bot/docs that referenced this issue May 13, 2022
ref #tikv/pd/issues/4400

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant