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

status: add new http status API for get meta regions. #4597

Merged
merged 9 commits into from Oct 10, 2017

Conversation

Projects
None yet
5 participants
@hicqu
Contributor

hicqu commented Sep 21, 2017

Add a new API( /regions/meta ) for get meta regions.
The return JSON is:

[
    {
        "leader": {
            "id": 3,
            "store_id": 1
        },
        "peers": [
            {
                "id": 3,
                "store_id": 1
            }
        ],
        "region_epoch": {
            "conf_ver": 1,
            "version": 1
        },
        "region_id": 2
    }
]

Meta means those TiKV keys which start with m.

@siddontang , PTAL, thanks.

@hicqu hicqu requested a review from AndreMouche Sep 21, 2017

@coocood

This comment has been minimized.

Show comment
Hide comment
@coocood

coocood Sep 21, 2017

Member

@hicqu
Please add test.

Member

coocood commented Sep 21, 2017

@hicqu
Please add test.

resp, err := http.Get("http://127.0.0.1:10090/regions/meta")
c.Assert(err, IsNil)
defer resp.Body.Close()
c.Assert(resp.StatusCode, Equals, http.StatusOK)

This comment has been minimized.

@coocood

coocood Sep 21, 2017

Member

Why not verify the body?

@coocood

coocood Sep 21, 2017

Member

Why not verify the body?

This comment has been minimized.

@hicqu

hicqu Sep 28, 2017

Contributor

Now we do verify whether the body is a valid json array or not.

@hicqu

hicqu Sep 28, 2017

Contributor

Now we do verify whether the body is a valid json array or not.

This comment has been minimized.

@coocood

coocood Sep 28, 2017

Member

Why not verify if it is region meta?

@coocood

coocood Sep 28, 2017

Member

Why not verify if it is region meta?

This comment has been minimized.

@hicqu

hicqu Sep 29, 2017

Contributor

Fixed. PTAL, thanks!

@hicqu

hicqu Sep 29, 2017

Contributor

Fixed. PTAL, thanks!

@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli

shenli Sep 26, 2017

Member

@hicqu Please address the comment.

Member

shenli commented Sep 26, 2017

@hicqu Please address the comment.

@hicqu

This comment has been minimized.

Show comment
Hide comment
@hicqu

hicqu Sep 29, 2017

Contributor

/run-all-test

Contributor

hicqu commented Sep 29, 2017

/run-all-test

@coocood

This comment has been minimized.

Show comment
Hide comment
@coocood

coocood Sep 30, 2017

Member

LGTM

Member

coocood commented Sep 30, 2017

LGTM

@hicqu

This comment has been minimized.

Show comment
Hide comment
@hicqu

hicqu Sep 30, 2017

Contributor

@disksing @shenli , PTAL, thanks.

Contributor

hicqu commented Sep 30, 2017

@disksing @shenli , PTAL, thanks.

@coocood coocood added the status/LGT1 label Oct 9, 2017

@disksing

This comment has been minimized.

Show comment
Hide comment
@disksing

disksing Oct 10, 2017

Member

LGTM.

Member

disksing commented Oct 10, 2017

LGTM.

@winoros winoros removed the status/LGT1 label Oct 10, 2017

@winoros winoros merged commit e9ffb58 into master Oct 10, 2017

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
ci/circleci Your tests passed on CircleCI!
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@winoros winoros deleted the qupeng/meta-region branch Oct 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment