@@ -10,15 +10,15 @@ package sorock;
1010// Client may send a write requests twice but they are executed only once as long as
1111// they have the same `request_id`.
1212message WriteRequest {
13- uint32 shard_id = 1 ;
13+ uint32 shard_index = 1 ;
1414 bytes message = 2 ;
1515 string request_id = 3 ;
1616}
1717
1818// Read-only request to the `RaftApp`.
1919// This type of request is processed in optimized path.
2020message ReadRequest {
21- uint32 shard_id = 1 ;
21+ uint32 shard_index = 1 ;
2222 bytes message = 2 ;
2323 bool read_locally = 3 ;
2424}
@@ -34,12 +34,12 @@ message Clock {
3434}
3535
3636message KernRequest {
37- uint32 shard_id = 1 ;
37+ uint32 shard_index = 1 ;
3838 bytes message = 2 ;
3939}
4040
4141message ReplicationStreamHeader {
42- uint32 shard_id = 1 ;
42+ uint32 shard_index = 1 ;
4343 string sender_id = 2 ;
4444 Clock prev_clock = 3 ;
4545}
@@ -60,7 +60,7 @@ message ReplicationStreamResponse {
6060}
6161
6262message GetSnapshotRequest {
63- uint32 shard_id = 1 ;
63+ uint32 shard_index = 1 ;
6464 uint64 index = 2 ;
6565}
6666
@@ -69,7 +69,7 @@ message SnapshotChunk {
6969}
7070
7171message VoteRequest {
72- uint32 shard_id = 1 ;
72+ uint32 shard_index = 1 ;
7373 uint64 vote_term = 2 ;
7474 string candidate_id = 3 ;
7575 Clock candidate_clock = 4 ;
@@ -92,13 +92,13 @@ message Heartbeat {
9292
9393// Request to add a Raft process with `server_id` to a shard.
9494message AddServerRequest {
95- uint32 shard_id = 1 ;
95+ uint32 shard_index = 1 ;
9696 string server_id = 2 ;
9797}
9898
9999// Request to remove a Raft process with `server_id` from a shard.
100100message RemoveServerRequest {
101- uint32 shard_id = 1 ;
101+ uint32 shard_index = 1 ;
102102 string server_id = 2 ;
103103}
104104
@@ -114,7 +114,7 @@ message Membership {
114114// to become a leader disregarding the election timeout.
115115// You can use this request to rebalance the leaders in the cluster.
116116message TimeoutNow {
117- uint32 shard_id = 1 ;
117+ uint32 shard_index = 1 ;
118118}
119119
120120message LogMetrics {
0 commit comments