Skip to content

Commit

Permalink
pdpb: show etcd leader, add leader priority. (pingcap#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
disksing authored Feb 1, 2018
1 parent 6bcc71d commit 7fe0eb6
Show file tree
Hide file tree
Showing 9 changed files with 691 additions and 479 deletions.
455 changes: 274 additions & 181 deletions pkg/pdpb/pdpb.pb.go

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions proto/pdpb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ message Member {
uint64 member_id = 2;
repeated string peer_urls = 3;
repeated string client_urls = 4;
int32 leader_priority = 5;
}

message GetMembersRequest {
Expand All @@ -214,6 +215,7 @@ message GetMembersResponse {

repeated Member members = 2;
Member leader = 3;
Member etcd_leader = 4;
}

message PeerStats {
Expand Down
2 changes: 1 addition & 1 deletion src/coprocessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x1f\n\x0bother_error\x18\x04\x20\x01(\tR\notherError\x12+\n\x05range\
\x18\x05\x20\x01(\x0b2\x15.coprocessor.KeyRangeR\x05range\x127\n\x0cexec\
_details\x18\x06\x20\x01(\x0b2\x14.kvrpcpb.ExecDetailsR\x0bexecDetailsB&\
\n\x18com.pingcap.tikv.kvproto\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\xc8\xe2\
\n\x18com.pingcap.tikv.kvproto\xd0\xe2\x1e\x01\xe0\xe2\x1e\x01\xc8\xe2\
\x1e\x01J\xea\x0b\n\x06\x12\x04\0\0!\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\
\n\x08\n\x01\x02\x12\x03\x01\x08\x13\n\t\n\x02\x03\0\x12\x03\x03\x07\x16\
\n\t\n\x02\x03\x01\x12\x03\x04\x07\x16\n\t\n\x02\x03\x02\x12\x03\x05\x07\
Expand Down
2 changes: 1 addition & 1 deletion src/debugpb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4226,7 +4226,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x10RecoverFailPoint\x12\x20.debugpb.RecoverFailPointRequest\x1a!.debugp\
b.RecoverFailPointResponse\"\0\x12S\n\x0eListFailPoints\x12\x1e.debugpb.\
ListFailPointsRequest\x1a\x1f.debugpb.ListFailPointsResponse\"\0B&\n\x18\
com.pingcap.tikv.kvproto\xd0\xe2\x1e\x01\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\
com.pingcap.tikv.kvproto\xe0\xe2\x1e\x01\xc8\xe2\x1e\x01\xd0\xe2\x1e\x01\
J\x91%\n\x07\x12\x05\0\0\x95\x01\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\
\x08\n\x01\x02\x12\x03\x01\x08\x0f\n\t\n\x02\x03\0\x12\x03\x03\x07\x16\n\
\t\n\x02\x03\x01\x12\x03\x04\x07\x16\n\t\n\x02\x03\x02\x12\x03\x05\x07\
Expand Down
2 changes: 1 addition & 1 deletion src/importpb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x8b\x01\n\tImportSST\x12?\n\x06Upload\x12\x17.importpb.UploadRequest\
\x1a\x18.importpb.UploadResponse\"\0(\x01\x12=\n\x06Ingest\x12\x17.impor\
tpb.IngestRequest\x1a\x18.importpb.IngestResponse\"\0B&\n\x18com.pingcap\
.tikv.kvproto\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\xc8\xe2\x1e\x01J\x97\x15\n\
.tikv.kvproto\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01J\x97\x15\n\
\x06\x12\x04\0\0C\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\
\x12\x03\x02\x08\x10\n\t\n\x02\x03\0\x12\x03\x04\x07\x15\n\t\n\x02\x03\
\x01\x12\x03\x05\x07\x16\n\t\n\x02\x03\x02\x12\x03\x06\x07\x16\n\t\n\x02\
Expand Down
2 changes: 1 addition & 1 deletion src/kvrpcpb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14761,7 +14761,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x07\n\x03Low\x10\x01\x12\x08\n\x04High\x10\x02*\x20\n\x0eIsolationLevel\
\x12\x06\n\x02SI\x10\0\x12\x06\n\x02RC\x10\x01*.\n\x02Op\x12\x07\n\x03Pu\
t\x10\0\x12\x07\n\x03Del\x10\x01\x12\x08\n\x04Lock\x10\x02\x12\x0c\n\x08\
Rollback\x10\x03B&\n\x18com.pingcap.tikv.kvproto\xe0\xe2\x1e\x01\xd0\xe2\
Rollback\x10\x03B&\n\x18com.pingcap.tikv.kvproto\xd0\xe2\x1e\x01\xe0\xe2\
\x1e\x01\xc8\xe2\x1e\x01J\xcbk\n\x07\x12\x05\0\0\xcf\x02\x01\n\x08\n\x01\
\x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x01\x08\x0f\n\t\n\x02\x03\0\
\x12\x03\x03\x07\x15\n\t\n\x02\x03\x01\x12\x03\x04\x07\x16\n\t\n\x02\x03\
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ extern crate futures;
extern crate grpcio;

pub mod coprocessor;
pub mod debugpb;
pub mod debugpb_grpc;
pub mod debugpb;
pub mod eraftpb;
pub mod errorpb;
pub mod importpb;
pub mod importpb_grpc;
pub mod importpb;
pub mod kvrpcpb;
pub mod metapb;
pub mod pdpb;
pub mod pdpb_grpc;
pub mod pdpb;
pub mod raft_cmdpb;
pub mod raft_serverpb;
pub mod tikvpb;
pub mod tikvpb_grpc;
pub mod tikvpb;
2 changes: 1 addition & 1 deletion src/metapb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
1\n\x04Peer\x12\x0e\n\x02id\x18\x01\x20\x01(\x04R\x02id\x12\x19\n\x08sto\
re_id\x18\x02\x20\x01(\x04R\x07storeId*0\n\nStoreState\x12\x06\n\x02Up\
\x10\0\x12\x0b\n\x07Offline\x10\x01\x12\r\n\tTombstone\x10\x02B&\n\x18co\
m.pingcap.tikv.kvproto\xe0\xe2\x1e\x01\xc8\xe2\x1e\x01\xd0\xe2\x1e\x01J\
m.pingcap.tikv.kvproto\xc8\xe2\x1e\x01\xd0\xe2\x1e\x01\xe0\xe2\x1e\x01J\
\x9d\x11\n\x06\x12\x04\0\0:\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\x08\n\
\x01\x02\x12\x03\x01\x08\x0e\n\t\n\x02\x03\0\x12\x03\x03\x07\x1d\n\x08\n\
\x01\x08\x12\x03\x05\0(\n\x0b\n\x04\x08\xe7\x07\0\x12\x03\x05\0(\n\x0c\n\
Expand Down
695 changes: 406 additions & 289 deletions src/pdpb.rs

Large diffs are not rendered by default.

0 comments on commit 7fe0eb6

Please sign in to comment.