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: Add table range api to http status server (#20456) #20620

Merged
merged 2 commits into from
Nov 12, 2020
Merged

server: Add table range api to http status server (#20456) #20620

merged 2 commits into from
Nov 12, 2020

Conversation

sunxiaoguang
Copy link
Contributor

Cherry pick pr #20456

Signed-off-by: Xiaoguang Sun sunxiaoguang@zhihu.com

What problem does this PR solve?

Add table range api to http status server so users can easily query misc ranges information of a particular table.

What is changed and how it works?

Add /tables/{db}/{table}/ranges to http status server and return ranges information row and all indices of the table.

What's Changed:
Add /tables/{db}/{table}/ranges to http status server.

How it Works:
Compute row ranges based on table's id, indices ranges from table's metadata.

Related changes

Add routing information to server/http_status.go
Add handler to server/http_handler.go

Tests

  • Unit test
    server/http_handler_test.go
    TestRangesAPI
    TestListTableRanges

Side effects
None

Release note

  • No release note

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
@sunxiaoguang
Copy link
Contributor Author

@lonng Could you please check this cherry pick so it can be included in the next 4.0 release

Copy link
Contributor

@lonng lonng left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 2, 2020
@lonng
Copy link
Contributor

lonng commented Nov 2, 2020

@sunxiaoguang Sorry for the late review.

@lonng
Copy link
Contributor

lonng commented Nov 2, 2020

@Yisaer PTAL

@lonng lonng requested a review from Yisaer November 2, 2020 03:45
Copy link
Contributor

@Yisaer Yisaer left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Nov 2, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Nov 2, 2020
@zz-jason
Copy link
Member

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 12, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 2411352 into pingcap:release-4.0 Nov 12, 2020
@sunxiaoguang sunxiaoguang deleted the table-ranges-api-on-4.0 branch November 24, 2020 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants