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

config: initial config protocol #498

Merged
merged 18 commits into from
Dec 9, 2019
Merged

config: initial config protocol #498

merged 18 commits into from
Dec 9, 2019

Conversation

overvenus
Copy link
Member

This PR adds config protocol.

Signed-off-by: Neil Shen <overvenus@gmail.com>
rpc Update(UpdateRequest) returns (UpdateResponse) {}
}

message Error {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to change the Error to Status like the RocksDB status.

Signed-off-by: Neil Shen <overvenus@gmail.com>
lonng
lonng previously approved these changes Nov 21, 2019
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

enum StatusCode {
UNKNOWN = 0;
FAILED = 1;
STALE_VERSION = 3;
Copy link
Member

Choose a reason for hiding this comment

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

should be 2?

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add variant NOT_CHANGE which represents the configuration do not change?

Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
lonng
lonng previously approved these changes Nov 21, 2019

message Version {
uint64 local = 1;
uint64 global = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

Need some comments? Hard to know what local and global mean.

Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
@@ -60,8 +53,8 @@ message ConfigEntry {
message CreateRequest {
uint64 cluster_id = 1;
Version version = 2;
bytes component_id = 3;
Component component = 4;
string component = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could keep in consistent with TiDB system table TIDB_CLUTER_INFO, use TYPE and ADDRESS to represent a cluster component node, which maybe make the user have a more understanding.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not only for tidb but also for other services, I prefer to keep it generic.

Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
lonng
lonng previously approved these changes Nov 25, 2019
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
}

message Status {
enum StatusCode {
Copy link
Contributor

Choose a reason for hiding this comment

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

Using the name StatusCode will generate StatusStatusCode in rust, maybe Code is ok.

overvenus and others added 3 commits December 9, 2019 17:10
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
Copy link
Member

@rleungx rleungx left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@NingLin-P NingLin-P left a comment

Choose a reason for hiding this comment

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

LGTM

@overvenus overvenus merged commit 66bbae9 into master Dec 9, 2019
@overvenus overvenus deleted the config branch December 9, 2019 10:28
daimashusheng pushed a commit to daimashusheng/kvproto that referenced this pull request Sep 2, 2021
Signed-off-by: Neil Shen <overvenus@gmail.com>
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.

5 participants