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

Add ConfChange::AddLearnerNode command. #212

Merged
merged 7 commits into from
Nov 17, 2017
Merged

Add ConfChange::AddLearnerNode command. #212

merged 7 commits into from
Nov 17, 2017

Conversation

hicqu
Copy link
Contributor

@hicqu hicqu commented Nov 16, 2017

This PR is for support raft learner. See etcd-io/etcd#8751

@siddontang
Copy link
Member

LGTM

@siddontang
Copy link
Member

PTAL @overvenus @BusyJay

@ngaut
Copy link
Member

ngaut commented Nov 16, 2017

LGTM

@hicqu
Copy link
Contributor Author

hicqu commented Nov 16, 2017

@BusyJay PTAL thanks.

proto/pdpb.proto Outdated
@@ -233,6 +233,7 @@ message RegionHeartbeatRequest {
enum ConfChangeType {
AddNode = 0;
RemoveNode = 1;
AddLearnerNode = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought pd should also support add learner node command.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. But not in this pr.

@BusyJay
Copy link
Contributor

BusyJay commented Nov 16, 2017

Please add pr description to show where the changes come from.

@hicqu
Copy link
Contributor Author

hicqu commented Nov 17, 2017

@BusyJay PTAL thanks.

@@ -72,11 +72,13 @@ message HardState {

message ConfState {
repeated uint64 nodes = 1;
repeated uint64 learner_nodes = 2;
Copy link
Member

Choose a reason for hiding this comment

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

@@ -51,6 +51,7 @@ message Region {
optional bytes end_key = 3;
optional RegionEpoch region_epoch = 4;
repeated Peer peers = 5;
repeated Peer learners = 6;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should remove this too.

@hicqu
Copy link
Contributor Author

hicqu commented Nov 17, 2017

@BusyJay @overvenus PTAL thanks.

@BusyJay
Copy link
Contributor

BusyJay commented Nov 17, 2017

LGTM

@siddontang siddontang merged commit c2232b3 into master Nov 17, 2017
@siddontang siddontang deleted the raft-learner branch November 17, 2017 08:29
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