refactor(proto): simplify RPC messages & types

Removes the input oneof - a shard caller MUST always provide a
table/namespace, and MAY provide an optional payload (which in the
future will enable sharding using column valuess/etc). As there is
currently no payload-based sharding, this simplifies the RPC message.

Changes the returned types to better reflect the types we use internally
- this should avoid type juggling for both server & client.
pull/24376/head
Dom Dwyer 2022-08-24 11:35:02 +02:00
parent 4beb721a9a
commit f11af90c46
1 changed files with 4 additions and 10 deletions

View File

@ -10,17 +10,11 @@ service ShardService {
message ShardToSequencerIdRequest {
// The shard input values to map onto a Sequencer.
oneof input {
// A table & namespace pair.
TableNamespaceTuple table_namespace = 1;
}
string table_name = 1;
string namespace_name = 2;
}
message ShardToSequencerIdResponse {
uint64 sequencer_id = 1;
}
message TableNamespaceTuple {
string table = 1;
string namespace = 2;
int64 sequencer_id = 1;
int32 sequencer_index = 2;
}