From 6c1d69537e3e753b132b24346ffb55e52878337a Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Mon, 26 Feb 2024 14:53:18 +0500 Subject: [PATCH 01/13] Fix & refactor spqrdump --- cmd/spqrdump/main.go | 174 +++++++++++++++++++++++-------------------- pkg/decode/spqrql.go | 29 +++++--- 2 files changed, 111 insertions(+), 92 deletions(-) diff --git a/cmd/spqrdump/main.go b/cmd/spqrdump/main.go index de85c2eb5..a29f9bdf3 100644 --- a/cmd/spqrdump/main.go +++ b/cmd/spqrdump/main.go @@ -5,6 +5,7 @@ import ( "crypto/tls" "fmt" "net" + "strings" "github.com/jackc/pgx/v5/pgproto3" "github.com/spf13/cobra" @@ -36,27 +37,6 @@ var endpoint string var proto string var passwd string -// TODO : unit tests -func DumpRules() error { - cc, err := Dial(endpoint) - if err != nil { - return err - } - - rCl := protos.NewShardingRulesServiceClient(cc) - if rules, err := rCl.ListShardingRules(context.Background(), &protos.ListShardingRuleRequest{}); err != nil { - spqrlog.Zero.Error(). - Err(err). - Msg("failed to dump endpoint rules") - } else { - for _, rule := range rules.Rules { - fmt.Printf("%s;\n", decode.DecodeRule(rule)) - } - } - - return nil -} - // TODO : unit tests func waitRFQ(fr *pgproto3.Frontend) error { for { @@ -133,14 +113,27 @@ func getconn() (*pgproto3.Frontend, error) { } // TODO : unit tests -func DumpRulesPSQL() error { +func DumpKeyRangesPsql() error { + return dumpPsql("SHOW key_ranges;", func(v *pgproto3.DataRow) (string, error) { + l := string(v.Values[2]) + r := string(v.Values[3]) + id := string(v.Values[0]) + shard := string(v.Values[1]) + + return decode.KeyRange( + &protos.KeyRangeInfo{ + KeyRange: &protos.KeyRange{LowerBound: l, UpperBound: r}, + ShardId: shard, Krid: id}), nil + }) +} +func dumpPsql(query string, rowToStr func(v *pgproto3.DataRow) (string, error)) error { frontend, err := getconn() if err != nil { return err } frontend.Send(&pgproto3.Query{ - String: "SHOW key_ranges;", + String: query, }) if err := frontend.Flush(); err != nil { return err @@ -156,16 +149,11 @@ func DumpRulesPSQL() error { switch v := msg.(type) { case *pgproto3.DataRow: - l := string(v.Values[2]) - r := string(v.Values[3]) - id := string(v.Values[0]) - shard := string(v.Values[1]) - - fmt.Printf("%s;\n", - decode.DecodeKeyRange( - &protos.KeyRangeInfo{ - KeyRange: &protos.KeyRange{LowerBound: l, UpperBound: r}, - ShardId: shard, Krid: id})) + s, err := rowToStr(v) + if err != nil { + return err + } + fmt.Println(s) case *pgproto3.ErrorResponse: return fmt.Errorf("failed to wait for RQF: %s", v.Message) case *pgproto3.ReadyForQuery: @@ -176,74 +164,93 @@ func DumpRulesPSQL() error { } // TODO : unit tests -func DumpKeyRangesPSQL() error { - - frontend, err := getconn() +func DumpKeyRanges() error { + cc, err := Dial(endpoint) if err != nil { return err } - frontend.Send(&pgproto3.Query{ - String: "SHOW sharding_rules;", - }) - if err := frontend.Flush(); err != nil { - return err - } - for { - if msg, err := frontend.Receive(); err != nil { - return err - } else { - spqrlog.Zero.Debug(). - Interface("message", msg). - Msg("received message") - switch v := msg.(type) { - case *pgproto3.DataRow: - col := string(v.Values[2]) - id := string(v.Values[0]) - tablename := string(v.Values[1]) - - fmt.Printf("%s;\n", - decode.DecodeRule( - &protos.ShardingRule{ - Id: id, - TableName: tablename, - ShardingRuleEntry: []*protos.ShardingRuleEntry{ - { - Column: col, - }, - }, - }), - ) - case *pgproto3.ErrorResponse: - return fmt.Errorf("failed to wait for RQF: %s", v.Message) - case *pgproto3.ReadyForQuery: - return nil - } + rCl := protos.NewKeyRangeServiceClient(cc) + if keys, err := rCl.ListKeyRange(context.Background(), &protos.ListKeyRangeRequest{}); err != nil { + spqrlog.Zero.Error(). + Err(err). + Msg("failed to dump endpoint rules") + } else { + for _, krg := range keys.KeyRangesInfo { + fmt.Println(decode.KeyRange(krg)) } } + + return nil } +// DumpDistributions dump info about distributions & attached relations via GRPC // TODO : unit tests -func DumpKeyRanges() error { +func DumpDistributions() error { cc, err := Dial(endpoint) if err != nil { return err } - rCl := protos.NewKeyRangeServiceClient(cc) - if keys, err := rCl.ListKeyRange(context.Background(), &protos.ListKeyRangeRequest{}); err != nil { + rCl := protos.NewDistributionServiceClient(cc) + if dss, err := rCl.ListDistributions(context.Background(), &protos.ListDistributionsRequest{}); err != nil { spqrlog.Zero.Error(). Err(err). - Msg("failed to dump endpoint rules") + Msg("failed to dump endpoint distributions") } else { - for _, krg := range keys.KeyRangesInfo { - fmt.Printf("%s;\n", decode.DecodeKeyRange(krg)) + for _, ds := range dss.Distributions { + fmt.Println(decode.Distribution(ds)) + for _, rel := range ds.Relations { + fmt.Println(decode.DistributedRelation(rel, ds.Id)) + } } } return nil } +// DumpDistributionsPsql dump info about distributions via psql +// TODO : unit tests +func DumpDistributionsPsql() error { + return dumpPsql("SHOW distributions;", func(v *pgproto3.DataRow) (string, error) { + id := string(v.Values[0]) + types := string(v.Values[1]) + + return decode.Distribution( + &protos.Distribution{ + Id: id, + ColumnTypes: strings.Split(types, ","), + }), nil + }) +} + +// DumpRelationsPsql dump info about distributed relations via psql +// TODO : unit tests +func DumpRelationsPsql() error { + return dumpPsql("SHOW relations;", func(v *pgproto3.DataRow) (string, error) { + name := string(v.Values[0]) + ds := string(v.Values[1]) + dsKeyStr := strings.Split(string(v.Values[2]), ",") + dsKey := make([]*protos.DistributionKeyEntry, len(dsKeyStr)) + for i, elem := range dsKeyStr { + elems := strings.Split(strings.Trim(elem, "()"), ",") + if len(elems) != 2 { + return "", fmt.Errorf("incorrect distribution key entry: \"%s\"", elem) + } + dsKey[i] = &protos.DistributionKeyEntry{ + Column: strings.Trim(elems[0], "\""), + HashFunction: elems[1], + } + } + + return decode.DistributedRelation( + &protos.DistributedRelation{ + Name: name, + DistributionKey: dsKey, + }, ds), nil + }) +} + var dump = &cobra.Command{ Use: "dump", Short: "list running routers in current topology", @@ -254,18 +261,21 @@ var dump = &cobra.Command{ switch proto { case "grpc": - if err := DumpRules(); err != nil { + if err := DumpKeyRanges(); err != nil { return err } - if err := DumpKeyRanges(); err != nil { + if err := DumpDistributions(); err != nil { return err } return nil case "psql": - if err := DumpRulesPSQL(); err != nil { + if err := DumpKeyRangesPsql(); err != nil { + return err + } + if err := DumpDistributionsPsql(); err != nil { return err } - if err := DumpKeyRangesPSQL(); err != nil { + if err := DumpRelationsPsql(); err != nil { return err } return nil diff --git a/pkg/decode/spqrql.go b/pkg/decode/spqrql.go index d37c27220..9fa8c6a09 100644 --- a/pkg/decode/spqrql.go +++ b/pkg/decode/spqrql.go @@ -2,22 +2,31 @@ package decode import ( "fmt" + "strings" protos "github.com/pg-sharding/spqr/pkg/protos" ) -// TODO : unit tests -func DecodeRule(rule *protos.ShardingRule) string { +// KeyRange returns query to create given key range +// TODO unit tests +func KeyRange(krg *protos.KeyRangeInfo) string { /* TODO: composite key support */ - if rule.TableName != "" { - return fmt.Sprintf("CREATE SHARDING RULE %s TABLE %s COLUMN %s", rule.Id, rule.TableName, rule.ShardingRuleEntry[0].Column) - } - return fmt.Sprintf("CREATE SHARDING RULE %s COLUMN %s", rule.Id, rule.ShardingRuleEntry[0].Column) + + return fmt.Sprintf("CREATE KEY RANGE %s FROM %s ROUTE TO %s FOR DSITRIBUTION %s;", krg.Krid, krg.KeyRange.LowerBound, krg.ShardId, krg.DistributionId) } -// TODO : unit tests -func DecodeKeyRange(krg *protos.KeyRangeInfo) string { - /* TODO: composite key support */ +// Distribution returns query to create given distribution +// TODO unit tests +func Distribution(ds *protos.Distribution) string { + return fmt.Sprintf("CREATE DISTRIBUTION %s COLUMN TYPES %s;", ds.Id, strings.Join(ds.ColumnTypes, ", ")) +} - return fmt.Sprintf("CREATE KEY RANGE %s FROM %s TO %s ROUTE TO %s", krg.Krid, krg.KeyRange.LowerBound, krg.KeyRange.UpperBound, krg.ShardId) +// DistributedRelation return query to attach relation to distribution +// TODO unit tests +func DistributedRelation(rel *protos.DistributedRelation, ds string) string { + elems := make([]string, len(rel.DistributionKey)) + for j, el := range rel.DistributionKey { + elems[j] = fmt.Sprintf("%s HASH FUNCTION %s", el.Column, el.HashFunction) + } + return fmt.Sprintf("ALTER DISTRIBUTION %s ATTACH RELATTION %s DISTRIBUTION KEY %s;", ds, rel.Name, strings.Join(elems, ", ")) } From 489c4794f867aef3522183e9dd48f5b2ad29863c Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Mon, 26 Feb 2024 15:13:10 +0500 Subject: [PATCH 02/13] Added tests & fixed spqrql --- pkg/decode/spqrql.go | 4 +- pkg/decode/spqrql_test.go | 86 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 pkg/decode/spqrql_test.go diff --git a/pkg/decode/spqrql.go b/pkg/decode/spqrql.go index 9fa8c6a09..655c5d610 100644 --- a/pkg/decode/spqrql.go +++ b/pkg/decode/spqrql.go @@ -12,7 +12,7 @@ import ( func KeyRange(krg *protos.KeyRangeInfo) string { /* TODO: composite key support */ - return fmt.Sprintf("CREATE KEY RANGE %s FROM %s ROUTE TO %s FOR DSITRIBUTION %s;", krg.Krid, krg.KeyRange.LowerBound, krg.ShardId, krg.DistributionId) + return fmt.Sprintf("CREATE KEY RANGE %s FROM %s ROUTE TO %s FOR DISTRIBUTION %s;", krg.Krid, krg.KeyRange.LowerBound, krg.ShardId, krg.DistributionId) } // Distribution returns query to create given distribution @@ -28,5 +28,5 @@ func DistributedRelation(rel *protos.DistributedRelation, ds string) string { for j, el := range rel.DistributionKey { elems[j] = fmt.Sprintf("%s HASH FUNCTION %s", el.Column, el.HashFunction) } - return fmt.Sprintf("ALTER DISTRIBUTION %s ATTACH RELATTION %s DISTRIBUTION KEY %s;", ds, rel.Name, strings.Join(elems, ", ")) + return fmt.Sprintf("ALTER DISTRIBUTION %s ATTACH RELATION %s DISTRIBUTION KEY %s;", ds, rel.Name, strings.Join(elems, ", ")) } diff --git a/pkg/decode/spqrql_test.go b/pkg/decode/spqrql_test.go new file mode 100644 index 000000000..813a91f5f --- /dev/null +++ b/pkg/decode/spqrql_test.go @@ -0,0 +1,86 @@ +package decode + +import ( + protos "github.com/pg-sharding/spqr/pkg/protos" + "github.com/stretchr/testify/assert" + "testing" +) + +func TestKeyRange(t *testing.T) { + assert := assert.New(t) + assert.Equal("CREATE KEY RANGE kr1 FROM 10 ROUTE TO sh1 FOR DISTRIBUTION ds1;", + KeyRange(&protos.KeyRangeInfo{ + Krid: "kr1", + ShardId: "sh1", + DistributionId: "ds1", + KeyRange: &protos.KeyRange{ + LowerBound: "10", + }, + })) + // UpperBound is ignored + assert.Equal("CREATE KEY RANGE kr1 FROM 10 ROUTE TO sh1 FOR DISTRIBUTION ds1;", + KeyRange(&protos.KeyRangeInfo{ + Krid: "kr1", + ShardId: "sh1", + DistributionId: "ds1", + KeyRange: &protos.KeyRange{ + LowerBound: "10", + UpperBound: "20", + }, + })) +} + +func TestDistribution(t *testing.T) { + assert := assert.New(t) + assert.Equal("CREATE DISTRIBUTION ds1 COLUMN TYPES integer;", + Distribution(&protos.Distribution{ + Id: "ds1", + ColumnTypes: []string{"integer"}, + })) + + // relations ignored + assert.Equal("CREATE DISTRIBUTION ds1 COLUMN TYPES integer;", + Distribution(&protos.Distribution{ + Id: "ds1", + ColumnTypes: []string{"integer"}, + Relations: []*protos.DistributedRelation{ + {Name: "rel", DistributionKey: []*protos.DistributionKeyEntry{{Column: "id", HashFunction: "identity"}}}, + }, + })) + + // multiple types + assert.Equal("CREATE DISTRIBUTION ds1 COLUMN TYPES integer, varchar;", + Distribution(&protos.Distribution{ + Id: "ds1", + ColumnTypes: []string{"integer", "varchar"}, + })) + + // order is preserved + assert.Equal("CREATE DISTRIBUTION ds1 COLUMN TYPES varchar, integer;", + Distribution(&protos.Distribution{ + Id: "ds1", + ColumnTypes: []string{"varchar", "integer"}, + })) +} + +func TestDistributedRelation(t *testing.T) { + assert := assert.New(t) + assert.Equal("ALTER DISTRIBUTION ds1 ATTACH RELATION rel DISTRIBUTION KEY id HASH FUNCTION identity;", + DistributedRelation(&protos.DistributedRelation{ + Name: "rel", + DistributionKey: []*protos.DistributionKeyEntry{{Column: "id", HashFunction: "identity"}}, + }, "ds1"), + ) + + // multiple columns + assert.Equal("ALTER DISTRIBUTION ds1 ATTACH RELATION rel DISTRIBUTION KEY id HASH FUNCTION identity, "+ + "id2 HASH FUNCTION city;", + DistributedRelation(&protos.DistributedRelation{ + Name: "rel", + DistributionKey: []*protos.DistributionKeyEntry{ + {Column: "id", HashFunction: "identity"}, + {Column: "id2", HashFunction: "city"}, + }, + }, "ds1"), + ) +} From 095f2104db836d07b3add420ba9a80ff8b8042df Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Mon, 26 Feb 2024 15:14:16 +0500 Subject: [PATCH 03/13] Added tests & fixed spqrql --- pkg/decode/spqrql.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/decode/spqrql.go b/pkg/decode/spqrql.go index 655c5d610..dab9c4e51 100644 --- a/pkg/decode/spqrql.go +++ b/pkg/decode/spqrql.go @@ -8,21 +8,17 @@ import ( ) // KeyRange returns query to create given key range -// TODO unit tests func KeyRange(krg *protos.KeyRangeInfo) string { /* TODO: composite key support */ - return fmt.Sprintf("CREATE KEY RANGE %s FROM %s ROUTE TO %s FOR DISTRIBUTION %s;", krg.Krid, krg.KeyRange.LowerBound, krg.ShardId, krg.DistributionId) } // Distribution returns query to create given distribution -// TODO unit tests func Distribution(ds *protos.Distribution) string { return fmt.Sprintf("CREATE DISTRIBUTION %s COLUMN TYPES %s;", ds.Id, strings.Join(ds.ColumnTypes, ", ")) } // DistributedRelation return query to attach relation to distribution -// TODO unit tests func DistributedRelation(rel *protos.DistributedRelation, ds string) string { elems := make([]string, len(rel.DistributionKey)) for j, el := range rel.DistributionKey { From da3b80d1d357c8669c572420062d31478aace64c Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Mon, 26 Feb 2024 17:16:40 +0500 Subject: [PATCH 04/13] Add ListAllKeyRanges to grpc --- pkg/protos/key_range.pb.go | 431 ++++++++++++++++++-------------- pkg/protos/key_range_grpc.pb.go | 37 +++ protos/key_range.proto | 3 + 3 files changed, 285 insertions(+), 186 deletions(-) diff --git a/pkg/protos/key_range.pb.go b/pkg/protos/key_range.pb.go index f89f5fa52..e75609dd4 100644 --- a/pkg/protos/key_range.pb.go +++ b/pkg/protos/key_range.pb.go @@ -240,6 +240,44 @@ func (x *ListKeyRangeRequest) GetDistribution() string { return "" } +type ListAllKeyRangesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListAllKeyRangesRequest) Reset() { + *x = ListAllKeyRangesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_protos_key_range_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAllKeyRangesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAllKeyRangesRequest) ProtoMessage() {} + +func (x *ListAllKeyRangesRequest) ProtoReflect() protoreflect.Message { + mi := &file_protos_key_range_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAllKeyRangesRequest.ProtoReflect.Descriptor instead. +func (*ListAllKeyRangesRequest) Descriptor() ([]byte, []int) { + return file_protos_key_range_proto_rawDescGZIP(), []int{3} +} + type AddKeyRangeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -251,7 +289,7 @@ type AddKeyRangeRequest struct { func (x *AddKeyRangeRequest) Reset() { *x = AddKeyRangeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[3] + mi := &file_protos_key_range_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -264,7 +302,7 @@ func (x *AddKeyRangeRequest) String() string { func (*AddKeyRangeRequest) ProtoMessage() {} func (x *AddKeyRangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[3] + mi := &file_protos_key_range_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -277,7 +315,7 @@ func (x *AddKeyRangeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddKeyRangeRequest.ProtoReflect.Descriptor instead. func (*AddKeyRangeRequest) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{3} + return file_protos_key_range_proto_rawDescGZIP(), []int{4} } func (x *AddKeyRangeRequest) GetKeyRangeInfo() *KeyRangeInfo { @@ -300,7 +338,7 @@ type SplitKeyRangeRequest struct { func (x *SplitKeyRangeRequest) Reset() { *x = SplitKeyRangeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[4] + mi := &file_protos_key_range_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -313,7 +351,7 @@ func (x *SplitKeyRangeRequest) String() string { func (*SplitKeyRangeRequest) ProtoMessage() {} func (x *SplitKeyRangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[4] + mi := &file_protos_key_range_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -326,7 +364,7 @@ func (x *SplitKeyRangeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SplitKeyRangeRequest.ProtoReflect.Descriptor instead. func (*SplitKeyRangeRequest) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{4} + return file_protos_key_range_proto_rawDescGZIP(), []int{5} } func (x *SplitKeyRangeRequest) GetKeyRangeInfo() *KeyRangeInfo { @@ -362,7 +400,7 @@ type MergeKeyRangeRequest struct { func (x *MergeKeyRangeRequest) Reset() { *x = MergeKeyRangeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[5] + mi := &file_protos_key_range_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -375,7 +413,7 @@ func (x *MergeKeyRangeRequest) String() string { func (*MergeKeyRangeRequest) ProtoMessage() {} func (x *MergeKeyRangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[5] + mi := &file_protos_key_range_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -388,7 +426,7 @@ func (x *MergeKeyRangeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MergeKeyRangeRequest.ProtoReflect.Descriptor instead. func (*MergeKeyRangeRequest) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{5} + return file_protos_key_range_proto_rawDescGZIP(), []int{6} } func (x *MergeKeyRangeRequest) GetBound() []byte { @@ -417,7 +455,7 @@ type MoveKeyRangeRequest struct { func (x *MoveKeyRangeRequest) Reset() { *x = MoveKeyRangeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[6] + mi := &file_protos_key_range_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -430,7 +468,7 @@ func (x *MoveKeyRangeRequest) String() string { func (*MoveKeyRangeRequest) ProtoMessage() {} func (x *MoveKeyRangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[6] + mi := &file_protos_key_range_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -443,7 +481,7 @@ func (x *MoveKeyRangeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MoveKeyRangeRequest.ProtoReflect.Descriptor instead. func (*MoveKeyRangeRequest) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{6} + return file_protos_key_range_proto_rawDescGZIP(), []int{7} } func (x *MoveKeyRangeRequest) GetKeyRange() *KeyRangeInfo { @@ -471,7 +509,7 @@ type DropKeyRangeRequest struct { func (x *DropKeyRangeRequest) Reset() { *x = DropKeyRangeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[7] + mi := &file_protos_key_range_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -484,7 +522,7 @@ func (x *DropKeyRangeRequest) String() string { func (*DropKeyRangeRequest) ProtoMessage() {} func (x *DropKeyRangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[7] + mi := &file_protos_key_range_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -497,7 +535,7 @@ func (x *DropKeyRangeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DropKeyRangeRequest.ProtoReflect.Descriptor instead. func (*DropKeyRangeRequest) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{7} + return file_protos_key_range_proto_rawDescGZIP(), []int{8} } func (x *DropKeyRangeRequest) GetId() []string { @@ -516,7 +554,7 @@ type DropAllKeyRangesRequest struct { func (x *DropAllKeyRangesRequest) Reset() { *x = DropAllKeyRangesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[8] + mi := &file_protos_key_range_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -529,7 +567,7 @@ func (x *DropAllKeyRangesRequest) String() string { func (*DropAllKeyRangesRequest) ProtoMessage() {} func (x *DropAllKeyRangesRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[8] + mi := &file_protos_key_range_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -542,7 +580,7 @@ func (x *DropAllKeyRangesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DropAllKeyRangesRequest.ProtoReflect.Descriptor instead. func (*DropAllKeyRangesRequest) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{8} + return file_protos_key_range_proto_rawDescGZIP(), []int{9} } type DropAllKeyRangesResponse struct { @@ -556,7 +594,7 @@ type DropAllKeyRangesResponse struct { func (x *DropAllKeyRangesResponse) Reset() { *x = DropAllKeyRangesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[9] + mi := &file_protos_key_range_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -569,7 +607,7 @@ func (x *DropAllKeyRangesResponse) String() string { func (*DropAllKeyRangesResponse) ProtoMessage() {} func (x *DropAllKeyRangesResponse) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[9] + mi := &file_protos_key_range_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -582,7 +620,7 @@ func (x *DropAllKeyRangesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DropAllKeyRangesResponse.ProtoReflect.Descriptor instead. func (*DropAllKeyRangesResponse) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{9} + return file_protos_key_range_proto_rawDescGZIP(), []int{10} } func (x *DropAllKeyRangesResponse) GetKeyRange() []*KeyRangeInfo { @@ -603,7 +641,7 @@ type LockKeyRangeRequest struct { func (x *LockKeyRangeRequest) Reset() { *x = LockKeyRangeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[10] + mi := &file_protos_key_range_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -616,7 +654,7 @@ func (x *LockKeyRangeRequest) String() string { func (*LockKeyRangeRequest) ProtoMessage() {} func (x *LockKeyRangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[10] + mi := &file_protos_key_range_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -629,7 +667,7 @@ func (x *LockKeyRangeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LockKeyRangeRequest.ProtoReflect.Descriptor instead. func (*LockKeyRangeRequest) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{10} + return file_protos_key_range_proto_rawDescGZIP(), []int{11} } func (x *LockKeyRangeRequest) GetId() []string { @@ -650,7 +688,7 @@ type UnlockKeyRangeRequest struct { func (x *UnlockKeyRangeRequest) Reset() { *x = UnlockKeyRangeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[11] + mi := &file_protos_key_range_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -663,7 +701,7 @@ func (x *UnlockKeyRangeRequest) String() string { func (*UnlockKeyRangeRequest) ProtoMessage() {} func (x *UnlockKeyRangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[11] + mi := &file_protos_key_range_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -676,7 +714,7 @@ func (x *UnlockKeyRangeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UnlockKeyRangeRequest.ProtoReflect.Descriptor instead. func (*UnlockKeyRangeRequest) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{11} + return file_protos_key_range_proto_rawDescGZIP(), []int{12} } func (x *UnlockKeyRangeRequest) GetId() []string { @@ -697,7 +735,7 @@ type KeyRangeReply struct { func (x *KeyRangeReply) Reset() { *x = KeyRangeReply{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[12] + mi := &file_protos_key_range_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -710,7 +748,7 @@ func (x *KeyRangeReply) String() string { func (*KeyRangeReply) ProtoMessage() {} func (x *KeyRangeReply) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[12] + mi := &file_protos_key_range_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -723,7 +761,7 @@ func (x *KeyRangeReply) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyRangeReply.ProtoReflect.Descriptor instead. func (*KeyRangeReply) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{12} + return file_protos_key_range_proto_rawDescGZIP(), []int{13} } func (x *KeyRangeReply) GetKeyRangesInfo() []*KeyRangeInfo { @@ -744,7 +782,7 @@ type ModifyReply struct { func (x *ModifyReply) Reset() { *x = ModifyReply{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[13] + mi := &file_protos_key_range_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -757,7 +795,7 @@ func (x *ModifyReply) String() string { func (*ModifyReply) ProtoMessage() {} func (x *ModifyReply) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[13] + mi := &file_protos_key_range_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -770,7 +808,7 @@ func (x *ModifyReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ModifyReply.ProtoReflect.Descriptor instead. func (*ModifyReply) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{13} + return file_protos_key_range_proto_rawDescGZIP(), []int{14} } func (x *ModifyReply) GetOperationId() string { @@ -791,7 +829,7 @@ type ResolveKeyRangeRequest struct { func (x *ResolveKeyRangeRequest) Reset() { *x = ResolveKeyRangeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[14] + mi := &file_protos_key_range_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -804,7 +842,7 @@ func (x *ResolveKeyRangeRequest) String() string { func (*ResolveKeyRangeRequest) ProtoMessage() {} func (x *ResolveKeyRangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[14] + mi := &file_protos_key_range_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -817,7 +855,7 @@ func (x *ResolveKeyRangeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolveKeyRangeRequest.ProtoReflect.Descriptor instead. func (*ResolveKeyRangeRequest) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{14} + return file_protos_key_range_proto_rawDescGZIP(), []int{15} } func (x *ResolveKeyRangeRequest) GetBound() string { @@ -838,7 +876,7 @@ type ResolveKeyRangeReply struct { func (x *ResolveKeyRangeReply) Reset() { *x = ResolveKeyRangeReply{} if protoimpl.UnsafeEnabled { - mi := &file_protos_key_range_proto_msgTypes[15] + mi := &file_protos_key_range_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -851,7 +889,7 @@ func (x *ResolveKeyRangeReply) String() string { func (*ResolveKeyRangeReply) ProtoMessage() {} func (x *ResolveKeyRangeReply) ProtoReflect() protoreflect.Message { - mi := &file_protos_key_range_proto_msgTypes[15] + mi := &file_protos_key_range_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -864,7 +902,7 @@ func (x *ResolveKeyRangeReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ResolveKeyRangeReply.ProtoReflect.Descriptor instead. func (*ResolveKeyRangeReply) Descriptor() ([]byte, []int) { - return file_protos_key_range_proto_rawDescGZIP(), []int{15} + return file_protos_key_range_proto_rawDescGZIP(), []int{16} } func (x *ResolveKeyRangeReply) GetKeyRangeD() []string { @@ -896,109 +934,115 @@ var file_protos_key_range_proto_rawDesc = []byte{ 0x22, 0x39, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, - 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4e, 0x0a, 0x12, 0x41, - 0x64, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x38, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x70, 0x71, 0x72, - 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x6b, - 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x14, - 0x53, 0x70, 0x6c, 0x69, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, - 0x70, 0x71, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x0c, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, - 0x0a, 0x05, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, - 0x64, 0x22, 0x50, 0x0a, 0x14, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, - 0x22, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x13, 0x4d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x6b, 0x65, - 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x19, 0x0a, 0x17, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4e, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x4b, 0x65, 0x79, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0e, + 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x14, 0x53, 0x70, 0x6c, 0x69, 0x74, + 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x38, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4b, + 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x6b, 0x65, 0x79, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x14, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, + 0x0a, 0x13, 0x4d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, + 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x49, 0x64, 0x22, 0x25, 0x0a, 0x13, 0x44, 0x72, 0x6f, 0x70, 0x4b, 0x65, 0x79, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x44, + 0x72, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x18, 0x44, 0x72, 0x6f, 0x70, 0x41, 0x6c, + 0x6c, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4b, 0x65, 0x79, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x22, 0x25, 0x0a, 0x13, 0x4c, 0x6f, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x15, 0x55, 0x6e, + 0x6c, 0x6f, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3a, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x6f, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x74, 0x6f, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x22, 0x25, 0x0a, 0x13, 0x44, 0x72, 0x6f, + 0x6f, 0x52, 0x0d, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x30, 0x0a, 0x0b, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x4b, 0x65, 0x79, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x22, 0x36, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x4b, 0x65, 0x79, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x0b, 0x6b, 0x65, + 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x2a, 0x2b, 0x0a, 0x0e, 0x4b, 0x65, + 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, + 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x56, 0x41, 0x49, + 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x32, 0x87, 0x06, 0x0a, 0x0f, 0x4b, 0x65, 0x79, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, + 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x70, + 0x71, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4b, 0x65, + 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, + 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, + 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x13, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x6b, 0x4b, + 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4c, + 0x6f, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4b, 0x65, + 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x18, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x41, 0x64, + 0x64, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x11, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0c, 0x44, 0x72, 0x6f, 0x70, 0x4b, 0x65, 0x79, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x19, 0x0a, 0x17, 0x44, 0x72, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x18, 0x44, - 0x72, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x70, 0x71, - 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, - 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x25, 0x0a, 0x13, 0x4c, 0x6f, 0x63, 0x6b, - 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x27, 0x0a, 0x15, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3a, 0x0a, 0x0f, 0x6b, 0x65, 0x79, - 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x30, 0x0a, 0x0b, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x36, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, - 0x1e, 0x0a, 0x0b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x2a, - 0x2b, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, - 0x09, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x32, 0xbd, 0x05, 0x0a, - 0x0f, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x19, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x73, 0x70, - 0x71, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x4b, 0x65, - 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, - 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x12, 0x18, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x4b, 0x65, 0x79, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x70, - 0x71, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, - 0x12, 0x3e, 0x0a, 0x0c, 0x44, 0x72, 0x6f, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x19, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4b, 0x65, 0x79, 0x52, + 0x1a, 0x11, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x10, 0x44, 0x72, 0x6f, 0x70, 0x41, 0x6c, 0x6c, + 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x70, 0x71, 0x72, + 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, + 0x44, 0x72, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0e, 0x55, 0x6e, + 0x6c, 0x6f, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1b, 0x2e, 0x73, + 0x70, 0x71, 0x72, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x70, 0x71, 0x72, + 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x40, + 0x0a, 0x0d, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x1a, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, - 0x12, 0x53, 0x0a, 0x10, 0x44, 0x72, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x44, 0x72, 0x6f, 0x70, - 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x41, - 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x4b, - 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1b, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x55, - 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x69, - 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x53, 0x70, 0x6c, - 0x69, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x73, 0x70, 0x71, - 0x72, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x4d, - 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x73, - 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, - 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, - 0x0c, 0x4d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x19, 0x2e, - 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, - 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4d, 0x0a, - 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x1c, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x4b, - 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, - 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x4b, 0x65, 0x79, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x0c, 0x5a, 0x0a, - 0x73, 0x70, 0x71, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x12, 0x40, 0x0a, 0x0d, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x1a, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, + 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, + 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0c, 0x4d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x4b, 0x65, + 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, + 0x73, 0x70, 0x71, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x4b, 0x65, 0x79, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x70, 0x71, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, + 0x00, 0x42, 0x0c, 0x5a, 0x0a, 0x73, 0x70, 0x71, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1014,25 +1058,26 @@ func file_protos_key_range_proto_rawDescGZIP() []byte { } var file_protos_key_range_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_protos_key_range_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_protos_key_range_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_protos_key_range_proto_goTypes = []interface{}{ (KeyRangeStatus)(0), // 0: spqr.KeyRangeStatus (*KeyRange)(nil), // 1: spqr.KeyRange (*KeyRangeInfo)(nil), // 2: spqr.KeyRangeInfo (*ListKeyRangeRequest)(nil), // 3: spqr.ListKeyRangeRequest - (*AddKeyRangeRequest)(nil), // 4: spqr.AddKeyRangeRequest - (*SplitKeyRangeRequest)(nil), // 5: spqr.SplitKeyRangeRequest - (*MergeKeyRangeRequest)(nil), // 6: spqr.MergeKeyRangeRequest - (*MoveKeyRangeRequest)(nil), // 7: spqr.MoveKeyRangeRequest - (*DropKeyRangeRequest)(nil), // 8: spqr.DropKeyRangeRequest - (*DropAllKeyRangesRequest)(nil), // 9: spqr.DropAllKeyRangesRequest - (*DropAllKeyRangesResponse)(nil), // 10: spqr.DropAllKeyRangesResponse - (*LockKeyRangeRequest)(nil), // 11: spqr.LockKeyRangeRequest - (*UnlockKeyRangeRequest)(nil), // 12: spqr.UnlockKeyRangeRequest - (*KeyRangeReply)(nil), // 13: spqr.KeyRangeReply - (*ModifyReply)(nil), // 14: spqr.ModifyReply - (*ResolveKeyRangeRequest)(nil), // 15: spqr.ResolveKeyRangeRequest - (*ResolveKeyRangeReply)(nil), // 16: spqr.ResolveKeyRangeReply + (*ListAllKeyRangesRequest)(nil), // 4: spqr.ListAllKeyRangesRequest + (*AddKeyRangeRequest)(nil), // 5: spqr.AddKeyRangeRequest + (*SplitKeyRangeRequest)(nil), // 6: spqr.SplitKeyRangeRequest + (*MergeKeyRangeRequest)(nil), // 7: spqr.MergeKeyRangeRequest + (*MoveKeyRangeRequest)(nil), // 8: spqr.MoveKeyRangeRequest + (*DropKeyRangeRequest)(nil), // 9: spqr.DropKeyRangeRequest + (*DropAllKeyRangesRequest)(nil), // 10: spqr.DropAllKeyRangesRequest + (*DropAllKeyRangesResponse)(nil), // 11: spqr.DropAllKeyRangesResponse + (*LockKeyRangeRequest)(nil), // 12: spqr.LockKeyRangeRequest + (*UnlockKeyRangeRequest)(nil), // 13: spqr.UnlockKeyRangeRequest + (*KeyRangeReply)(nil), // 14: spqr.KeyRangeReply + (*ModifyReply)(nil), // 15: spqr.ModifyReply + (*ResolveKeyRangeRequest)(nil), // 16: spqr.ResolveKeyRangeRequest + (*ResolveKeyRangeReply)(nil), // 17: spqr.ResolveKeyRangeReply } var file_protos_key_range_proto_depIdxs = []int32{ 1, // 0: spqr.KeyRangeInfo.key_range:type_name -> spqr.KeyRange @@ -1042,27 +1087,29 @@ var file_protos_key_range_proto_depIdxs = []int32{ 2, // 4: spqr.DropAllKeyRangesResponse.key_range:type_name -> spqr.KeyRangeInfo 2, // 5: spqr.KeyRangeReply.key_ranges_info:type_name -> spqr.KeyRangeInfo 3, // 6: spqr.KeyRangeService.ListKeyRange:input_type -> spqr.ListKeyRangeRequest - 11, // 7: spqr.KeyRangeService.LockKeyRange:input_type -> spqr.LockKeyRangeRequest - 4, // 8: spqr.KeyRangeService.AddKeyRange:input_type -> spqr.AddKeyRangeRequest - 8, // 9: spqr.KeyRangeService.DropKeyRange:input_type -> spqr.DropKeyRangeRequest - 9, // 10: spqr.KeyRangeService.DropAllKeyRanges:input_type -> spqr.DropAllKeyRangesRequest - 12, // 11: spqr.KeyRangeService.UnlockKeyRange:input_type -> spqr.UnlockKeyRangeRequest - 5, // 12: spqr.KeyRangeService.SplitKeyRange:input_type -> spqr.SplitKeyRangeRequest - 6, // 13: spqr.KeyRangeService.MergeKeyRange:input_type -> spqr.MergeKeyRangeRequest - 7, // 14: spqr.KeyRangeService.MoveKeyRange:input_type -> spqr.MoveKeyRangeRequest - 15, // 15: spqr.KeyRangeService.ResolveKeyRange:input_type -> spqr.ResolveKeyRangeRequest - 13, // 16: spqr.KeyRangeService.ListKeyRange:output_type -> spqr.KeyRangeReply - 14, // 17: spqr.KeyRangeService.LockKeyRange:output_type -> spqr.ModifyReply - 14, // 18: spqr.KeyRangeService.AddKeyRange:output_type -> spqr.ModifyReply - 14, // 19: spqr.KeyRangeService.DropKeyRange:output_type -> spqr.ModifyReply - 10, // 20: spqr.KeyRangeService.DropAllKeyRanges:output_type -> spqr.DropAllKeyRangesResponse - 14, // 21: spqr.KeyRangeService.UnlockKeyRange:output_type -> spqr.ModifyReply - 14, // 22: spqr.KeyRangeService.SplitKeyRange:output_type -> spqr.ModifyReply - 14, // 23: spqr.KeyRangeService.MergeKeyRange:output_type -> spqr.ModifyReply - 14, // 24: spqr.KeyRangeService.MoveKeyRange:output_type -> spqr.ModifyReply - 16, // 25: spqr.KeyRangeService.ResolveKeyRange:output_type -> spqr.ResolveKeyRangeReply - 16, // [16:26] is the sub-list for method output_type - 6, // [6:16] is the sub-list for method input_type + 4, // 7: spqr.KeyRangeService.ListAllKeyRanges:input_type -> spqr.ListAllKeyRangesRequest + 12, // 8: spqr.KeyRangeService.LockKeyRange:input_type -> spqr.LockKeyRangeRequest + 5, // 9: spqr.KeyRangeService.AddKeyRange:input_type -> spqr.AddKeyRangeRequest + 9, // 10: spqr.KeyRangeService.DropKeyRange:input_type -> spqr.DropKeyRangeRequest + 10, // 11: spqr.KeyRangeService.DropAllKeyRanges:input_type -> spqr.DropAllKeyRangesRequest + 13, // 12: spqr.KeyRangeService.UnlockKeyRange:input_type -> spqr.UnlockKeyRangeRequest + 6, // 13: spqr.KeyRangeService.SplitKeyRange:input_type -> spqr.SplitKeyRangeRequest + 7, // 14: spqr.KeyRangeService.MergeKeyRange:input_type -> spqr.MergeKeyRangeRequest + 8, // 15: spqr.KeyRangeService.MoveKeyRange:input_type -> spqr.MoveKeyRangeRequest + 16, // 16: spqr.KeyRangeService.ResolveKeyRange:input_type -> spqr.ResolveKeyRangeRequest + 14, // 17: spqr.KeyRangeService.ListKeyRange:output_type -> spqr.KeyRangeReply + 14, // 18: spqr.KeyRangeService.ListAllKeyRanges:output_type -> spqr.KeyRangeReply + 15, // 19: spqr.KeyRangeService.LockKeyRange:output_type -> spqr.ModifyReply + 15, // 20: spqr.KeyRangeService.AddKeyRange:output_type -> spqr.ModifyReply + 15, // 21: spqr.KeyRangeService.DropKeyRange:output_type -> spqr.ModifyReply + 11, // 22: spqr.KeyRangeService.DropAllKeyRanges:output_type -> spqr.DropAllKeyRangesResponse + 15, // 23: spqr.KeyRangeService.UnlockKeyRange:output_type -> spqr.ModifyReply + 15, // 24: spqr.KeyRangeService.SplitKeyRange:output_type -> spqr.ModifyReply + 15, // 25: spqr.KeyRangeService.MergeKeyRange:output_type -> spqr.ModifyReply + 15, // 26: spqr.KeyRangeService.MoveKeyRange:output_type -> spqr.ModifyReply + 17, // 27: spqr.KeyRangeService.ResolveKeyRange:output_type -> spqr.ResolveKeyRangeReply + 17, // [17:28] is the sub-list for method output_type + 6, // [6:17] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name 6, // [6:6] is the sub-list for extension extendee 0, // [0:6] is the sub-list for field type_name @@ -1111,7 +1158,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddKeyRangeRequest); i { + switch v := v.(*ListAllKeyRangesRequest); i { case 0: return &v.state case 1: @@ -1123,7 +1170,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SplitKeyRangeRequest); i { + switch v := v.(*AddKeyRangeRequest); i { case 0: return &v.state case 1: @@ -1135,7 +1182,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MergeKeyRangeRequest); i { + switch v := v.(*SplitKeyRangeRequest); i { case 0: return &v.state case 1: @@ -1147,7 +1194,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MoveKeyRangeRequest); i { + switch v := v.(*MergeKeyRangeRequest); i { case 0: return &v.state case 1: @@ -1159,7 +1206,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropKeyRangeRequest); i { + switch v := v.(*MoveKeyRangeRequest); i { case 0: return &v.state case 1: @@ -1171,7 +1218,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropAllKeyRangesRequest); i { + switch v := v.(*DropKeyRangeRequest); i { case 0: return &v.state case 1: @@ -1183,7 +1230,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropAllKeyRangesResponse); i { + switch v := v.(*DropAllKeyRangesRequest); i { case 0: return &v.state case 1: @@ -1195,7 +1242,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LockKeyRangeRequest); i { + switch v := v.(*DropAllKeyRangesResponse); i { case 0: return &v.state case 1: @@ -1207,7 +1254,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnlockKeyRangeRequest); i { + switch v := v.(*LockKeyRangeRequest); i { case 0: return &v.state case 1: @@ -1219,7 +1266,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyRangeReply); i { + switch v := v.(*UnlockKeyRangeRequest); i { case 0: return &v.state case 1: @@ -1231,7 +1278,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModifyReply); i { + switch v := v.(*KeyRangeReply); i { case 0: return &v.state case 1: @@ -1243,7 +1290,7 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResolveKeyRangeRequest); i { + switch v := v.(*ModifyReply); i { case 0: return &v.state case 1: @@ -1255,6 +1302,18 @@ func file_protos_key_range_proto_init() { } } file_protos_key_range_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResolveKeyRangeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protos_key_range_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResolveKeyRangeReply); i { case 0: return &v.state @@ -1273,7 +1332,7 @@ func file_protos_key_range_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protos_key_range_proto_rawDesc, NumEnums: 1, - NumMessages: 16, + NumMessages: 17, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/protos/key_range_grpc.pb.go b/pkg/protos/key_range_grpc.pb.go index 97d3466b7..741a5cef4 100644 --- a/pkg/protos/key_range_grpc.pb.go +++ b/pkg/protos/key_range_grpc.pb.go @@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( KeyRangeService_ListKeyRange_FullMethodName = "/spqr.KeyRangeService/ListKeyRange" + KeyRangeService_ListAllKeyRanges_FullMethodName = "/spqr.KeyRangeService/ListAllKeyRanges" KeyRangeService_LockKeyRange_FullMethodName = "/spqr.KeyRangeService/LockKeyRange" KeyRangeService_AddKeyRange_FullMethodName = "/spqr.KeyRangeService/AddKeyRange" KeyRangeService_DropKeyRange_FullMethodName = "/spqr.KeyRangeService/DropKeyRange" @@ -36,6 +37,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type KeyRangeServiceClient interface { ListKeyRange(ctx context.Context, in *ListKeyRangeRequest, opts ...grpc.CallOption) (*KeyRangeReply, error) + ListAllKeyRanges(ctx context.Context, in *ListAllKeyRangesRequest, opts ...grpc.CallOption) (*KeyRangeReply, error) LockKeyRange(ctx context.Context, in *LockKeyRangeRequest, opts ...grpc.CallOption) (*ModifyReply, error) AddKeyRange(ctx context.Context, in *AddKeyRangeRequest, opts ...grpc.CallOption) (*ModifyReply, error) DropKeyRange(ctx context.Context, in *DropKeyRangeRequest, opts ...grpc.CallOption) (*ModifyReply, error) @@ -64,6 +66,15 @@ func (c *keyRangeServiceClient) ListKeyRange(ctx context.Context, in *ListKeyRan return out, nil } +func (c *keyRangeServiceClient) ListAllKeyRanges(ctx context.Context, in *ListAllKeyRangesRequest, opts ...grpc.CallOption) (*KeyRangeReply, error) { + out := new(KeyRangeReply) + err := c.cc.Invoke(ctx, KeyRangeService_ListAllKeyRanges_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *keyRangeServiceClient) LockKeyRange(ctx context.Context, in *LockKeyRangeRequest, opts ...grpc.CallOption) (*ModifyReply, error) { out := new(ModifyReply) err := c.cc.Invoke(ctx, KeyRangeService_LockKeyRange_FullMethodName, in, out, opts...) @@ -150,6 +161,7 @@ func (c *keyRangeServiceClient) ResolveKeyRange(ctx context.Context, in *Resolve // for forward compatibility type KeyRangeServiceServer interface { ListKeyRange(context.Context, *ListKeyRangeRequest) (*KeyRangeReply, error) + ListAllKeyRanges(context.Context, *ListAllKeyRangesRequest) (*KeyRangeReply, error) LockKeyRange(context.Context, *LockKeyRangeRequest) (*ModifyReply, error) AddKeyRange(context.Context, *AddKeyRangeRequest) (*ModifyReply, error) DropKeyRange(context.Context, *DropKeyRangeRequest) (*ModifyReply, error) @@ -169,6 +181,9 @@ type UnimplementedKeyRangeServiceServer struct { func (UnimplementedKeyRangeServiceServer) ListKeyRange(context.Context, *ListKeyRangeRequest) (*KeyRangeReply, error) { return nil, status.Errorf(codes.Unimplemented, "method ListKeyRange not implemented") } +func (UnimplementedKeyRangeServiceServer) ListAllKeyRanges(context.Context, *ListAllKeyRangesRequest) (*KeyRangeReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAllKeyRanges not implemented") +} func (UnimplementedKeyRangeServiceServer) LockKeyRange(context.Context, *LockKeyRangeRequest) (*ModifyReply, error) { return nil, status.Errorf(codes.Unimplemented, "method LockKeyRange not implemented") } @@ -227,6 +242,24 @@ func _KeyRangeService_ListKeyRange_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _KeyRangeService_ListAllKeyRanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAllKeyRangesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyRangeServiceServer).ListAllKeyRanges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyRangeService_ListAllKeyRanges_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyRangeServiceServer).ListAllKeyRanges(ctx, req.(*ListAllKeyRangesRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _KeyRangeService_LockKeyRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LockKeyRangeRequest) if err := dec(in); err != nil { @@ -400,6 +433,10 @@ var KeyRangeService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListKeyRange", Handler: _KeyRangeService_ListKeyRange_Handler, }, + { + MethodName: "ListAllKeyRanges", + Handler: _KeyRangeService_ListAllKeyRanges_Handler, + }, { MethodName: "LockKeyRange", Handler: _KeyRangeService_LockKeyRange_Handler, diff --git a/protos/key_range.proto b/protos/key_range.proto index 26dbbad79..e92d3a6fd 100644 --- a/protos/key_range.proto +++ b/protos/key_range.proto @@ -6,6 +6,7 @@ option go_package = "spqr/proto"; service KeyRangeService { rpc ListKeyRange (ListKeyRangeRequest) returns (KeyRangeReply) {} + rpc ListAllKeyRanges (ListAllKeyRangesRequest) returns (KeyRangeReply) {} rpc LockKeyRange (LockKeyRangeRequest) returns (ModifyReply) {} rpc AddKeyRange(AddKeyRangeRequest) returns (ModifyReply) {} rpc DropKeyRange(DropKeyRangeRequest) returns (ModifyReply) {} @@ -39,6 +40,8 @@ message ListKeyRangeRequest { string distribution = 1; } +message ListAllKeyRangesRequest { } + message AddKeyRangeRequest { KeyRangeInfo key_range_info = 1; } From a6e6a97e39ca6361928fb83ae1dcd402e593fad5 Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Mon, 26 Feb 2024 17:27:42 +0500 Subject: [PATCH 05/13] Add ListAllKeyRanges to KeyRangeServiceServer's --- coordinator/provider/keyranges.go | 17 ++++++++++++++++- router/grpc/qrouter.go | 16 ++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/coordinator/provider/keyranges.go b/coordinator/provider/keyranges.go index 10e6e81a7..acabb38b5 100644 --- a/coordinator/provider/keyranges.go +++ b/coordinator/provider/keyranges.go @@ -67,7 +67,7 @@ func (c *CoordinatorService) SplitKeyRange(ctx context.Context, request *protos. // TODO : unit tests func (c *CoordinatorService) ListKeyRange(ctx context.Context, request *protos.ListKeyRangeRequest) (*protos.KeyRangeReply, error) { - krsqb, err := c.impl.ListAllKeyRanges(ctx) + krsqb, err := c.impl.ListKeyRanges(ctx, request.Distribution) if err != nil { return nil, err } @@ -83,6 +83,21 @@ func (c *CoordinatorService) ListKeyRange(ctx context.Context, request *protos.L }, nil } +func (c *CoordinatorService) ListAllKeyRanges(ctx context.Context, _ *protos.ListAllKeyRangesRequest) (*protos.KeyRangeReply, error) { + krsDb, err := c.impl.ListAllKeyRanges(ctx) + if err != nil { + return nil, err + } + + krs := make([]*protos.KeyRangeInfo, len(krsDb)) + + for i, krg := range krsDb { + krs[i] = krg.ToProto() + } + + return &protos.KeyRangeReply{KeyRangesInfo: krs}, nil +} + // TODO : unit tests func (c *CoordinatorService) MoveKeyRange(ctx context.Context, request *protos.MoveKeyRangeRequest) (*protos.ModifyReply, error) { if err := c.impl.Move(ctx, &kr.MoveKeyRange{ diff --git a/router/grpc/qrouter.go b/router/grpc/qrouter.go index 94b79dc2c..b2c18e92e 100644 --- a/router/grpc/qrouter.go +++ b/router/grpc/qrouter.go @@ -215,6 +215,22 @@ func (l *LocalQrouterServer) ListKeyRange(ctx context.Context, request *protos.L }, nil } +// TODO : unit tests +func (l *LocalQrouterServer) ListAllKeyRanges(ctx context.Context, request *protos.ListAllKeyRangesRequest) (*protos.KeyRangeReply, error) { + krsDb, err := l.mgr.ListAllKeyRanges(ctx) + if err != nil { + return nil, err + } + + krs := make([]*protos.KeyRangeInfo, len(krsDb)) + + for i, krg := range krsDb { + krs[i] = krg.ToProto() + } + + return &protos.KeyRangeReply{KeyRangesInfo: krs}, nil +} + // TODO : unit tests func (l *LocalQrouterServer) LockKeyRange(ctx context.Context, request *protos.LockKeyRangeRequest) (*protos.ModifyReply, error) { for _, id := range request.Id { From f276966dd7892e3cbf361f96abd1b346ea88e295 Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Mon, 26 Feb 2024 17:28:52 +0500 Subject: [PATCH 06/13] Process empty hash correctly in spqrql --- pkg/decode/spqrql.go | 7 ++++++- pkg/decode/spqrql_test.go | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pkg/decode/spqrql.go b/pkg/decode/spqrql.go index dab9c4e51..3e7fe920e 100644 --- a/pkg/decode/spqrql.go +++ b/pkg/decode/spqrql.go @@ -22,7 +22,12 @@ func Distribution(ds *protos.Distribution) string { func DistributedRelation(rel *protos.DistributedRelation, ds string) string { elems := make([]string, len(rel.DistributionKey)) for j, el := range rel.DistributionKey { - elems[j] = fmt.Sprintf("%s HASH FUNCTION %s", el.Column, el.HashFunction) + if el.HashFunction != "" { + elems[j] = fmt.Sprintf("%s HASH FUNCTION %s", el.Column, el.HashFunction) + } else { + elems[j] = el.Column + } + } return fmt.Sprintf("ALTER DISTRIBUTION %s ATTACH RELATION %s DISTRIBUTION KEY %s;", ds, rel.Name, strings.Join(elems, ", ")) } diff --git a/pkg/decode/spqrql_test.go b/pkg/decode/spqrql_test.go index 813a91f5f..55b94a126 100644 --- a/pkg/decode/spqrql_test.go +++ b/pkg/decode/spqrql_test.go @@ -72,6 +72,14 @@ func TestDistributedRelation(t *testing.T) { }, "ds1"), ) + // missing hash func + assert.Equal("ALTER DISTRIBUTION ds1 ATTACH RELATION rel DISTRIBUTION KEY id;", + DistributedRelation(&protos.DistributedRelation{ + Name: "rel", + DistributionKey: []*protos.DistributionKeyEntry{{Column: "id"}}, + }, "ds1"), + ) + // multiple columns assert.Equal("ALTER DISTRIBUTION ds1 ATTACH RELATION rel DISTRIBUTION KEY id HASH FUNCTION identity, "+ "id2 HASH FUNCTION city;", From 2003a0f5a6cbc7e5c64755e9c3a79c28fb42f54a Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Mon, 26 Feb 2024 18:13:16 +0500 Subject: [PATCH 07/13] Fixed DistributionFromProto --- pkg/models/distributions/distribution.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/models/distributions/distribution.go b/pkg/models/distributions/distribution.go index e72ecfc17..37b2648a9 100644 --- a/pkg/models/distributions/distribution.go +++ b/pkg/models/distributions/distribution.go @@ -123,7 +123,15 @@ func DistributionFromDB(distr *qdb.Distribution) *Distribution { func DistributionFromProto(ds *proto.Distribution) *Distribution { return &Distribution{ - Id: ds.Id, + Id: ds.Id, + ColTypes: ds.ColumnTypes, + Relations: func() map[string]*DistributedRelation { + res := make(map[string]*DistributedRelation) + for _, rel := range ds.Relations { + res[rel.Name] = DistributedRelationFromProto(rel) + } + return res + }(), } } From 4b7881f997ea3e75b83237ee8b4a1966ea48ba6c Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Tue, 27 Feb 2024 10:00:45 +0500 Subject: [PATCH 08/13] Add feature test for dumper & small fixes --- .gitignore | 1 + Makefile | 5 +- cmd/spqrdump/main.go | 22 +++--- test/feature/features/dumper.feature | 83 ++++++++++++++++++++++ test/feature/testutil/docker_composer.go | 9 ++- test/feature/testutil/matchers/matchers.go | 2 +- 6 files changed, 110 insertions(+), 12 deletions(-) create mode 100644 test/feature/features/dumper.feature diff --git a/.gitignore b/.gitignore index a5533b2b9..1b9c05fc6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ spqr-worldmock spqr-balancer spqr-mover spqr-workloadreplay +spqr-dumper y.output *.swp *.swo diff --git a/Makefile b/Makefile index c166385e0..858491821 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,10 @@ build_worldmock: build_workloadreplay: go build -pgo=auto -o spqr-workloadreplay ./cmd/workloadreplay -build: build_balancer build_coordinator build_coorctl build_router build_mover build_worldmock build_workloadreplay +build_dumper: + go build -pgo=auto -o spqr-dumper ./cmd/spqrdump + +build: build_balancer build_coordinator build_coorctl build_router build_mover build_worldmock build_workloadreplay build_dumper build_images: docker compose build spqr-base-image diff --git a/cmd/spqrdump/main.go b/cmd/spqrdump/main.go index a29f9bdf3..39a63e25a 100644 --- a/cmd/spqrdump/main.go +++ b/cmd/spqrdump/main.go @@ -25,7 +25,7 @@ func Dial(addr string) (*grpc.ClientConn, error) { } var rootCmd = &cobra.Command{ - Use: "coorctl -e localhost:7003", + Use: "spqr-dumper -e localhost:7003", CompletionOptions: cobra.CompletionOptions{ DisableDefaultCmd: true, }, @@ -36,6 +36,7 @@ var rootCmd = &cobra.Command{ var endpoint string var proto string var passwd string +var logLevel string // TODO : unit tests func waitRFQ(fr *pgproto3.Frontend) error { @@ -171,7 +172,7 @@ func DumpKeyRanges() error { } rCl := protos.NewKeyRangeServiceClient(cc) - if keys, err := rCl.ListKeyRange(context.Background(), &protos.ListKeyRangeRequest{}); err != nil { + if keys, err := rCl.ListAllKeyRanges(context.Background(), &protos.ListAllKeyRangesRequest{}); err != nil { spqrlog.Zero.Error(). Err(err). Msg("failed to dump endpoint rules") @@ -253,31 +254,32 @@ func DumpRelationsPsql() error { var dump = &cobra.Command{ Use: "dump", - Short: "list running routers in current topology", + Short: "dump current sharding configuration", RunE: func(cmd *cobra.Command, args []string) error { + spqrlog.UpdateZeroLogLevel(logLevel) spqrlog.Zero.Debug(). Str("endpoint", endpoint). Msg("dialing spqrdump on") switch proto { case "grpc": - if err := DumpKeyRanges(); err != nil { + if err := DumpDistributions(); err != nil { return err } - if err := DumpDistributions(); err != nil { + if err := DumpKeyRanges(); err != nil { return err } return nil case "psql": - if err := DumpKeyRangesPsql(); err != nil { - return err - } if err := DumpDistributionsPsql(); err != nil { return err } if err := DumpRelationsPsql(); err != nil { return err } + if err := DumpKeyRangesPsql(); err != nil { + return err + } return nil default: return fmt.Errorf("failed to parse proto %s", proto) @@ -288,12 +290,14 @@ var dump = &cobra.Command{ } func init() { - rootCmd.PersistentFlags().StringVarP(&endpoint, "endpoint", "e", "localhost:7003", "endpoint for dump metadata") + rootCmd.PersistentFlags().StringVarP(&endpoint, "endpoint", "e", "localhost:7000", "endpoint for dump metadata") rootCmd.PersistentFlags().StringVarP(&proto, "proto", "t", "grpc", "protocol to use for communication") rootCmd.PersistentFlags().StringVarP(&passwd, "passwd", "p", "", "password to use for communication") + rootCmd.PersistentFlags().StringVarP(&logLevel, "log-level", "l", "error", "log level") + rootCmd.AddCommand(dump) } diff --git a/test/feature/features/dumper.feature b/test/feature/features/dumper.feature new file mode 100644 index 000000000..913f793a8 --- /dev/null +++ b/test/feature/features/dumper.feature @@ -0,0 +1,83 @@ +Feature: Dumper test + Background: + # + # Make host "coordinator" take control + # + Given cluster is up and running + And host "coordinator2" is stopped + And host "coordinator2" is started + + When I run SQL on host "coordinator" + """ + REGISTER ROUTER r1 ADDRESS regress_router::7000 + """ + Then command return code should be "0" + + Scenario: dump via GRPC works + When I run SQL on host "coordinator" + """ + CREATE DISTRIBUTION ds1 COLUMN TYPES integer; + CREATE KEY RANGE krid1 FROM 0 ROUTE TO sh1 FOR DISTRIBUTION ds1; + CREATE KEY RANGE krid2 FROM 11 ROUTE TO sh2 FOR DISTRIBUTION ds1; + ALTER DISTRIBUTION ds1 ATTACH RELATION test DISTRIBUTION KEY id; + """ + Then command return code should be "0" + + When I run command on host "router" + """ + /spqr/spqr-dumper dump -e regress_router:7000 + """ + Then command return code should be "0" + And command output should match regexp + """ + CREATE DISTRIBUTION ds1 COLUMN TYPES integer; + ALTER DISTRIBUTION ds1 ATTACH RELATION test DISTRIBUTION KEY id; + CREATE KEY RANGE krid1 FROM 0 ROUTE TO sh1 FOR DISTRIBUTION ds1; + CREATE KEY RANGE krid2 FROM 11 ROUTE TO sh2 FOR DISTRIBUTION ds1; + """ + + Scenario: dump via GRPC works with multidimensional distribution key + When I run SQL on host "coordinator" + """ + CREATE DISTRIBUTION ds1 COLUMN TYPES integer, varchar; + CREATE KEY RANGE krid1 FROM 0 ROUTE TO sh1 FOR DISTRIBUTION ds1; + CREATE KEY RANGE krid2 FROM 11 ROUTE TO sh2 FOR DISTRIBUTION ds1; + ALTER DISTRIBUTION ds1 ATTACH RELATION test DISTRIBUTION KEY id, id_2; + """ + Then command return code should be "0" + + When I run command on host "router" + """ + /spqr/spqr-dumper dump -e regress_router:7000 + """ + Then command return code should be "0" + And command output should match regexp + """ + CREATE DISTRIBUTION ds1 COLUMN TYPES integer, varchar; + ALTER DISTRIBUTION ds1 ATTACH RELATION test DISTRIBUTION KEY id, id_2; + CREATE KEY RANGE krid1 FROM 0 ROUTE TO sh1 FOR DISTRIBUTION ds1; + CREATE KEY RANGE krid2 FROM 11 ROUTE TO sh2 FOR DISTRIBUTION ds1; + """ + + Scenario: dump via GRPC works with hashed distribution key + When I run SQL on host "coordinator" + """ + CREATE DISTRIBUTION ds1 COLUMN TYPES integer; + CREATE KEY RANGE krid1 FROM 0 ROUTE TO sh1 FOR DISTRIBUTION ds1; + CREATE KEY RANGE krid2 FROM 11 ROUTE TO sh2 FOR DISTRIBUTION ds1; + ALTER DISTRIBUTION ds1 ATTACH RELATION test DISTRIBUTION KEY id HASH FUNCTION murmur; + """ + Then command return code should be "0" + + When I run command on host "router" + """ + /spqr/spqr-dumper dump -e regress_router:7000 + """ + Then command return code should be "0" + And command output should match regexp + """ + CREATE DISTRIBUTION ds1 COLUMN TYPES integer; + ALTER DISTRIBUTION ds1 ATTACH RELATION test DISTRIBUTION KEY id HASH FUNCTION murmur; + CREATE KEY RANGE krid1 FROM 0 ROUTE TO sh1 FOR DISTRIBUTION ds1; + CREATE KEY RANGE krid2 FROM 11 ROUTE TO sh2 FOR DISTRIBUTION ds1; + """ diff --git a/test/feature/testutil/docker_composer.go b/test/feature/testutil/docker_composer.go index d6d9beeff..b8841170f 100644 --- a/test/feature/testutil/docker_composer.go +++ b/test/feature/testutil/docker_composer.go @@ -2,6 +2,7 @@ package testutil import ( "archive/tar" + "bytes" "context" "fmt" "io" @@ -17,6 +18,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" + "github.com/docker/docker/pkg/stdcopy" ) const defaultDockerTimeout = 30 * time.Second @@ -222,7 +224,12 @@ func (dc *DockerComposer) RunCommand(service string, cmd string, timeout time.Du if err != nil { return 0, "", err } - output, err := io.ReadAll(attachResp.Reader) + var outBuf, errBuf bytes.Buffer + _, err = stdcopy.StdCopy(&outBuf, &errBuf, attachResp.Reader) + if err != nil { + return 0, "", fmt.Errorf("failed demultiplexing exec output") + } + output, err := io.ReadAll(&outBuf) attachResp.Close() if err != nil { return 0, "", err diff --git a/test/feature/testutil/matchers/matchers.go b/test/feature/testutil/matchers/matchers.go index 341c71580..d10a9724e 100644 --- a/test/feature/testutil/matchers/matchers.go +++ b/test/feature/testutil/matchers/matchers.go @@ -154,7 +154,7 @@ func JSONExactlyMatcher(actual string, expected string) error { return nil } -// GetMatcher returns registred matcher by name +// GetMatcher returns registered matcher by name func GetMatcher(name string) (Matcher, error) { if matcher, ok := registry[name]; ok { return matcher, nil From a381b6823c486eefdbbf0922fd49499ff2c9c20b Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Tue, 27 Feb 2024 10:07:37 +0500 Subject: [PATCH 09/13] Fix lint --- cmd/spqrdump/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/spqrdump/main.go b/cmd/spqrdump/main.go index 39a63e25a..836d3c469 100644 --- a/cmd/spqrdump/main.go +++ b/cmd/spqrdump/main.go @@ -256,7 +256,9 @@ var dump = &cobra.Command{ Use: "dump", Short: "dump current sharding configuration", RunE: func(cmd *cobra.Command, args []string) error { - spqrlog.UpdateZeroLogLevel(logLevel) + if err := spqrlog.UpdateZeroLogLevel(logLevel); err != nil { + return err + } spqrlog.Zero.Debug(). Str("endpoint", endpoint). Msg("dialing spqrdump on") From 663310e25041b2c3d947a2ac8c9a2e0935d48682 Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Tue, 27 Feb 2024 14:02:50 +0500 Subject: [PATCH 10/13] Added health checks for routers in feature tests --- test/feature/docker-compose.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/feature/docker-compose.yaml b/test/feature/docker-compose.yaml index 167d1f304..f170344f3 100644 --- a/test/feature/docker-compose.yaml +++ b/test/feature/docker-compose.yaml @@ -49,6 +49,11 @@ services: condition: service_healthy shard2: condition: service_healthy + healthcheck: + test: psql -h regress_router_2 -p 6432 -U regress -d regress + interval: 10s + timeout: 3s + retries: 50 router2: build: @@ -69,6 +74,11 @@ services: condition: service_healthy shard2: condition: service_healthy + healthcheck: + test: psql -h regress_router_2 -p 6432 -U regress -d regress + interval: 10s + timeout: 3s + retries: 50 coordinator: build: From 1b786e64dc538e6f0bfe2508ab547ed14b9c043a Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Tue, 27 Feb 2024 14:03:07 +0500 Subject: [PATCH 11/13] Fixed ListAllKeyRanges in Adapter --- pkg/coord/adapter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/coord/adapter.go b/pkg/coord/adapter.go index b5f09b197..48e907c68 100644 --- a/pkg/coord/adapter.go +++ b/pkg/coord/adapter.go @@ -59,7 +59,7 @@ func (a *Adapter) ListKeyRanges(ctx context.Context, distribution string) ([]*kr // TODO : unit tests func (a *Adapter) ListAllKeyRanges(ctx context.Context) ([]*kr.KeyRange, error) { c := proto.NewKeyRangeServiceClient(a.conn) - reply, err := c.ListKeyRange(ctx, &proto.ListKeyRangeRequest{}) + reply, err := c.ListAllKeyRanges(ctx, &proto.ListAllKeyRangesRequest{}) if err != nil { return nil, err } From 7ec180da9733de01c716fac48742225a358a57b7 Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Tue, 27 Feb 2024 14:58:27 +0500 Subject: [PATCH 12/13] spqr-dumper -> spqrdump --- .gitignore | 2 +- Makefile | 2 +- cmd/spqrdump/main.go | 2 +- test/feature/features/dumper.feature | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 1b9c05fc6..02bc408e8 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ spqr-worldmock spqr-balancer spqr-mover spqr-workloadreplay -spqr-dumper +spqrdump y.output *.swp *.swo diff --git a/Makefile b/Makefile index 858491821..4eade16eb 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ build_workloadreplay: go build -pgo=auto -o spqr-workloadreplay ./cmd/workloadreplay build_dumper: - go build -pgo=auto -o spqr-dumper ./cmd/spqrdump + go build -pgo=auto -o spqrdump ./cmd/spqrdump build: build_balancer build_coordinator build_coorctl build_router build_mover build_worldmock build_workloadreplay build_dumper diff --git a/cmd/spqrdump/main.go b/cmd/spqrdump/main.go index 836d3c469..eeae17659 100644 --- a/cmd/spqrdump/main.go +++ b/cmd/spqrdump/main.go @@ -25,7 +25,7 @@ func Dial(addr string) (*grpc.ClientConn, error) { } var rootCmd = &cobra.Command{ - Use: "spqr-dumper -e localhost:7003", + Use: "spqrdump -e localhost:7003", CompletionOptions: cobra.CompletionOptions{ DisableDefaultCmd: true, }, diff --git a/test/feature/features/dumper.feature b/test/feature/features/dumper.feature index 913f793a8..974bb8d9c 100644 --- a/test/feature/features/dumper.feature +++ b/test/feature/features/dumper.feature @@ -25,7 +25,7 @@ Feature: Dumper test When I run command on host "router" """ - /spqr/spqr-dumper dump -e regress_router:7000 + /spqr/spqrdump dump -e regress_router:7000 """ Then command return code should be "0" And command output should match regexp @@ -48,7 +48,7 @@ Feature: Dumper test When I run command on host "router" """ - /spqr/spqr-dumper dump -e regress_router:7000 + /spqr/spqrdump dump -e regress_router:7000 """ Then command return code should be "0" And command output should match regexp @@ -71,7 +71,7 @@ Feature: Dumper test When I run command on host "router" """ - /spqr/spqr-dumper dump -e regress_router:7000 + /spqr/spqrdump dump -e regress_router:7000 """ Then command return code should be "0" And command output should match regexp From 013d2238452027949cd091989155b0a079cc6e2b Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Wed, 28 Feb 2024 12:59:58 +0500 Subject: [PATCH 13/13] dumper -> spqrdump --- Makefile | 4 ++-- test/feature/features/dumper.feature | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4eade16eb..dd3282acc 100644 --- a/Makefile +++ b/Makefile @@ -41,10 +41,10 @@ build_worldmock: build_workloadreplay: go build -pgo=auto -o spqr-workloadreplay ./cmd/workloadreplay -build_dumper: +build_spqrdump: go build -pgo=auto -o spqrdump ./cmd/spqrdump -build: build_balancer build_coordinator build_coorctl build_router build_mover build_worldmock build_workloadreplay build_dumper +build: build_balancer build_coordinator build_coorctl build_router build_mover build_worldmock build_workloadreplay build_spqrdump build_images: docker compose build spqr-base-image diff --git a/test/feature/features/dumper.feature b/test/feature/features/dumper.feature index 974bb8d9c..cb2b0a321 100644 --- a/test/feature/features/dumper.feature +++ b/test/feature/features/dumper.feature @@ -1,4 +1,4 @@ -Feature: Dumper test +Feature: spqrdump test Background: # # Make host "coordinator" take control