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

support get region by id #44

Closed
siddontang opened this issue Mar 27, 2016 · 4 comments
Closed

support get region by id #44

siddontang opened this issue Mar 27, 2016 · 4 comments

Comments

@siddontang
Copy link
Contributor

now we only support get region by key, I think sometimes we may need get region by region id too.
If support, we should add a proto in pdpb.proto, maybe in GetMeta is OK, like

message GetMetaRequest {
    optional MetaType meta_type    = 1;
    optional uint64 node_id        = 2;
    optional uint64 store_id       = 3;
    optional bytes region_key      = 4;
    optional uint64 cluster_id     = 5;
    optional uint64 region_id    = 6;
}

If the meta_type is Region and region_key is set, we will use get region, or else region_id is set, we will use get region by id.

@qiuyesuifeng

@qiuyesuifeng
Copy link
Contributor

Agreed, but should we add a variable like type to show whether get region by id or key?

@siddontang
Copy link
Contributor Author

maybe no need, because they return same value, a region meta.

@qiuyesuifeng
Copy link
Contributor

Is it necessary to do this? Seems we have not used it now.
@siddontang

@qiuyesuifeng
Copy link
Contributor

No need now, close it.

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

No branches or pull requests

2 participants