From f11af90c4604b2b555d5e5f8b4e8422cdd8d2ab7 Mon Sep 17 00:00:00 2001 From: Dom Dwyer Date: Wed, 24 Aug 2022 11:35:02 +0200 Subject: [PATCH] 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. --- .../protos/influxdata/iox/sharder/v1/sharder.proto | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/generated_types/protos/influxdata/iox/sharder/v1/sharder.proto b/generated_types/protos/influxdata/iox/sharder/v1/sharder.proto index baae889f13..3e1d88e8ac 100644 --- a/generated_types/protos/influxdata/iox/sharder/v1/sharder.proto +++ b/generated_types/protos/influxdata/iox/sharder/v1/sharder.proto @@ -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; }