diff --git a/cmd/cmd.go b/cmd/cmd.go index b63a8d9..aaefe71 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -25,13 +25,29 @@ const ( reset = "\033[0m" ) -var commands = map[string]func(*session, ...string) (string, error){ +var commands = map[string]func(*session, ...string) string{ "GET": Get, "SET": Modify, "APPEND": Modify, - "DEL": Modify, - "MULTI": Modify, - "EXEC": Modify, + "DELETE": Modify, + "MULTI": Multi, + "EXEC": Exec, +} + +func Get(session *session, args ...string) string { + return session.TxnGet(args...) +} + +func Modify(session *session, args ...string) string { + return session.TxnModify(args...) +} + +func Multi(session *session, args ...string) string { + return session.TxnMulti() +} + +func Exec(session *session, args ...string) string { + return session.TxnExec() } func repl(session *session) { @@ -77,13 +93,8 @@ func repl(session *session) { fmt.Println("unknown command") continue } - result, err := handler(session, args...) - if err != nil { - success = false - fmt.Println(err.Error()) - } else { - fmt.Println(result) - } + result := handler(session, args...) + fmt.Println(result) } } diff --git a/cmd/cmd_buffer.go b/cmd/cmd_buffer.go new file mode 100644 index 0000000..ea7f02b --- /dev/null +++ b/cmd/cmd_buffer.go @@ -0,0 +1,63 @@ +package main + +import ( + "hash/fnv" + + pb "github.com/zjregee/shardkv/proto" +) + +type buffers map[uint64]*pb.Mutation + +func newBuffers() *buffers { + bs := make(buffers) + return &bs +} + +func (bs *buffers) addMutation(m *pb.Mutation) { + key := encodeKey(m.Key) + if _, ok := (*bs)[key]; !ok { + (*bs)[encodeKey(m.Key)] = m + return + } + switch (*bs)[key].Kind { + case pb.MutationKind_Put: + switch m.Kind { + case pb.MutationKind_Put, pb.MutationKind_Delete: + (*bs)[key] = m + case pb.MutationKind_Append: + (*bs)[key].Value = append((*bs)[key].Value, m.Value...) + } + case pb.MutationKind_Append: + switch m.Kind { + case pb.MutationKind_Put, pb.MutationKind_Delete: + (*bs)[key] = m + case pb.MutationKind_Append: + (*bs)[key].Value = append((*bs)[key].Value, m.Value...) + } + case pb.MutationKind_Delete: + switch m.Kind { + case pb.MutationKind_Put, pb.MutationKind_Delete: + (*bs)[key] = m + case pb.MutationKind_Append: + newM := &pb.Mutation{} + newM.Kind = pb.MutationKind_Put + newM.Key = m.Key + newM.Value = m.Value + (*bs)[key] = newM + } + } +} + +func (bs *buffers) mutations() []*pb.Mutation { + var ms []*pb.Mutation + for _, m := range *bs { + ms = append(ms, m) + } + return ms +} + +func encodeKey(key []byte) uint64 { + h := fnv.New64a() + h.Write(key) + return h.Sum64() +} diff --git a/cmd/cmd_session.go b/cmd/cmd_session.go new file mode 100644 index 0000000..7156a2f --- /dev/null +++ b/cmd/cmd_session.go @@ -0,0 +1,181 @@ +package main + +import ( + "context" + "fmt" + "strings" + "time" + + "github.com/zjregee/shardkv/common/utils" + pb "github.com/zjregee/shardkv/proto" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" +) + +type session struct { + isInMultiTxn bool + startTs uint64 + buffers *buffers + peers []*grpc.ClientConn + leaderIndex int32 +} + +func newSession(peers []string, leaderIndex int32) (*session, error) { + session := &session{} + session.isInMultiTxn = false + session.peers = make([]*grpc.ClientConn, 0) + session.leaderIndex = leaderIndex + for _, peer := range peers { + conn, err := grpc.NewClient(peer, grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + return nil, err + } + session.peers = append(session.peers, conn) + } + return session, nil +} + +func (session *session) Close() { + for _, conn := range session.peers { + _ = conn.Close() + } +} + +func (session *session) TxnGet(args ...string) string { + if len(args) != 2 { + return "usage: GET " + } + getArgs := &pb.TxnGetArgs{} + getArgs.Id = utils.Nrand() + getArgs.Key = []byte(args[0]) + if session.isInMultiTxn { + getArgs.StartTs = session.startTs + } else { + getArgs.StartTs = uint64(time.Now().UnixMilli()) + } + for { + if session.leaderIndex == -1 { + session.leaderIndex = int32(utils.Nrand()) % int32(len(session.peers)) + } + client := pb.NewKvServiceClient(session.peers[session.leaderIndex]) + ctx, cancel := context.WithTimeout(context.Background(), RPC_TIMEOUT) + reply, err := client.HandleTxnGet(ctx, getArgs) + cancel() + if err != nil { + session.leaderIndex = -1 + continue + } + switch reply.Err { + case pb.Err_ErrClosed, pb.Err_ErrWrongLeader: + session.leaderIndex = -1 + case pb.Err_OK: + return string(reply.Value) + case pb.Err_ErrNoKey: + return "" + } + } +} + +func (session *session) TxnModify(args ...string) string { + kind := strings.ToUpper(args[0]) + if kind == "SET" || kind == "APPEND" { + if len(args) != 3 { + return fmt.Sprintf("usage: %s ", kind) + } + } else { + if len(args) != 2 { + return fmt.Sprintf("usage: %s ", kind) + } + } + m := &pb.Mutation{} + m.Key = []byte(args[1]) + switch kind { + case "SET": + m.Kind = pb.MutationKind_Put + m.Value = []byte(args[2]) + case "APPEND": + m.Kind = pb.MutationKind_Append + m.Value = []byte(args[2]) + case "DEL": + m.Kind = pb.MutationKind_Delete + } + if session.isInMultiTxn { + session.buffers.addMutation(m) + return "" + } + return session.commitTxn([]*pb.Mutation{m}) +} + +func (session *session) TxnMulti() string { + if session.isInMultiTxn { + return "" + } + session.isInMultiTxn = true + session.startTs = uint64(time.Now().UnixMilli()) + session.buffers = newBuffers() + return "" +} + +func (session *session) TxnExec() string { + if !session.isInMultiTxn { + return "" + } + session.isInMultiTxn = false + return session.commitTxn(session.buffers.mutations()) +} + +func (session *session) commitTxn(ms []*pb.Mutation) string { + prewriteArgs := &pb.TxnPrewriteArgs{} + prewriteArgs.Id = utils.Nrand() + prewriteArgs.StartTs = session.startTs + prewriteArgs.Mutations = ms + success := false + for !success { + if session.leaderIndex == -1 { + session.leaderIndex = int32(utils.Nrand()) % int32(len(session.peers)) + } + client := pb.NewKvServiceClient(session.peers[session.leaderIndex]) + ctx, cancel := context.WithTimeout(context.Background(), RPC_TIMEOUT) + reply, err := client.HandleTxnPrewrite(ctx, prewriteArgs) + cancel() + if err != nil { + session.leaderIndex = -1 + continue + } + switch reply.Err { + case pb.Err_ErrClosed, pb.Err_ErrWrongLeader: + session.leaderIndex = -1 + case pb.Err_OK, pb.Err_Duplicate: + success = true + case pb.Err_ErrConflict: + return "can't commit due to transaction conflict" + } + } + commitArgs := &pb.TxnCommitArgs{} + commitArgs.Id = utils.Nrand() + commitArgs.StartTs = session.startTs + commitArgs.CommitTs = uint64(time.Now().UnixMilli()) + commitArgs.Keys = make([][]byte, 0) + for _, m := range ms { + commitArgs.Keys = append(commitArgs.Keys, m.Key) + } + for { + if session.leaderIndex == -1 { + session.leaderIndex = int32(utils.Nrand()) % int32(len(session.peers)) + } + client := pb.NewKvServiceClient(session.peers[session.leaderIndex]) + ctx, cancel := context.WithTimeout(context.Background(), RPC_TIMEOUT) + reply, err := client.HandleTxnCommit(ctx, commitArgs) + cancel() + if err != nil { + session.leaderIndex = -1 + continue + } + switch reply.Err { + case pb.Err_ErrClosed, pb.Err_ErrWrongLeader: + session.leaderIndex = -1 + case pb.Err_OK, pb.Err_Duplicate: + return "" + } + } +} diff --git a/cmd/cmd_utils.go b/cmd/cmd_utils.go deleted file mode 100644 index 49e4f5f..0000000 --- a/cmd/cmd_utils.go +++ /dev/null @@ -1,103 +0,0 @@ -package main - -import ( - "context" - "fmt" - "strings" - - "github.com/zjregee/shardkv/common/utils" - pb "github.com/zjregee/shardkv/proto" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" -) - -type session struct { - peers []*grpc.ClientConn - leaderIndex int32 -} - -func newSession(peers []string, leaderIndex int32) (*session, error) { - session := &session{} - session.peers = make([]*grpc.ClientConn, 0) - session.leaderIndex = leaderIndex - for _, peer := range peers { - conn, err := grpc.NewClient(peer, grpc.WithTransportCredentials(insecure.NewCredentials())) - if err != nil { - return nil, err - } - session.peers = append(session.peers, conn) - } - return session, nil -} - -func Get(session *session, args ...string) (string, error) { - if len(args) != 2 { - return "", fmt.Errorf("usage: GET ") - } - getArgs := pb.GetArgs{ - Id: utils.Nrand(), - Key: args[1], - } - for { - if session.leaderIndex == -1 { - session.leaderIndex = int32(utils.Nrand()) % int32(len(session.peers)) - } - client := pb.NewKvServiceClient(session.peers[session.leaderIndex]) - ctx, cancel := context.WithTimeout(context.Background(), RPC_TIMEOUT) - reply, err := client.HandleGet(ctx, &getArgs) - cancel() - if err != nil { - session.leaderIndex = -1 - continue - } - switch reply.Err { - case pb.Err_ErrClosed, pb.Err_ErrWrongLeader: - session.leaderIndex = -1 - case pb.Err_OK: - return reply.Value, nil - case pb.Err_ErrNoKey: - return "", nil - } - } -} - -func Modify(session *session, args ...string) (string, error) { - command := strings.ToUpper(args[0]) - if command == "SET" || command == "APPEND" { - if len(args) != 3 { - return "", fmt.Errorf("usage: %s ", command) - } - } else { - if len(args) != 2 { - return "", fmt.Errorf("usage: %s ", command) - } - } - modifyArgs := pb.ModifyArgs{ - Id: utils.Nrand(), - Kind: command, - Key: args[1], - Value: "", - } - if command != "DEL" { - modifyArgs.Value = args[2] - } - for { - if session.leaderIndex == -1 { - session.leaderIndex = int32(utils.Nrand()) % int32(len(session.peers)) - } - client := pb.NewKvServiceClient(session.peers[session.leaderIndex]) - ctx, cancel := context.WithTimeout(context.Background(), RPC_TIMEOUT) - reply, err := client.HandleModify(ctx, &modifyArgs) - cancel() - if err != nil { - session.leaderIndex = -1 - continue - } - switch reply.Err { - case pb.Err_ErrClosed, pb.Err_ErrWrongLeader: - session.leaderIndex = -1 - case pb.Err_OK, pb.Err_Duplicate: - return "OK", nil - } - } -} diff --git a/kv/server/server_handler.go b/kv/server/server_handler.go index 801f6f9..d4418d8 100644 --- a/kv/server/server_handler.go +++ b/kv/server/server_handler.go @@ -7,68 +7,6 @@ import ( pb "github.com/zjregee/shardkv/proto" ) -// func (kv *Server) HandleGet(_ context.Context, args *pb.GetArgs) (reply *pb.GetReply, nullErr error) { -// reply = &pb.GetReply{} -// defer func() { -// l.Log.Infof( -// "[node %d] reply get request, id=%d key=%s, value=%s, err=%s", -// kv.me, args.Id, args.Key, reply.Value, reply.Err, -// ) -// }() -// if kv.killed() { -// reply.Err = pb.Err_ErrClosed -// return -// } -// isLeader, leaderIndex := kv.state() -// if !isLeader { -// reply.Err = pb.Err_ErrWrongLeader -// reply.LeaderIndex = leaderIndex -// return -// } -// kv.mu.Lock() -// op := Op{ -// Id: args.Id, -// Kind: "GET", -// Key: args.Key, -// } -// err, value := kv.submitOp(op) -// kv.mu.Unlock() -// reply.Err = err -// reply.Value = value -// return -// } - -// func (kv *Server) HandleModify(_ context.Context, args *pb.ModifyArgs) (reply *pb.ModifyReply, nullErr error) { -// reply = &pb.ModifyReply{} -// defer func() { -// l.Log.Infof( -// "[node %d] reply modify request, id=%d kind=%s key=%s, value=%s, err=%s", -// kv.me, args.Id, args.Kind, args.Key, args.Value, reply.Err, -// ) -// }() -// if kv.killed() { -// reply.Err = pb.Err_ErrClosed -// return -// } -// isLeader, leaderIndex := kv.state() -// if !isLeader { -// reply.Err = pb.Err_ErrWrongLeader -// reply.LeaderIndex = leaderIndex -// return -// } -// kv.mu.Lock() -// op := Op{ -// Id: args.Id, -// Kind: args.Kind, -// Key: args.Key, -// Value: args.Value, -// } -// err, _ := kv.submitOp(op) -// kv.mu.Unlock() -// reply.Err = err -// return -// } - func (kv *Server) HandleConfigQuery(_ context.Context, args *pb.ConfigQueryArgs) (reply *pb.ConfigQueryReply, nullErr error) { reply = &pb.ConfigQueryReply{} defer func() { diff --git a/kv/server/server_transaction.go b/kv/server/server_transaction.go index 6b51a35..84f80b0 100644 --- a/kv/server/server_transaction.go +++ b/kv/server/server_transaction.go @@ -58,7 +58,7 @@ func (kv *Server) HandleTxnPrewrite(_ context.Context, args *pb.TxnPrewriteArgs) lock := &mvcc.Lock{} lock.Primary = m.Key lock.StartTs = args.StartTs - switch m.Op { + switch m.Kind { case pb.MutationKind_Put: txn.PutValue(m.Key, m.Value) lock.Kind = mvcc.WriteKindPut diff --git a/proto/kv.pb.go b/proto/kv.pb.go index 1a45d90..0e1e88f 100644 --- a/proto/kv.pb.go +++ b/proto/kv.pb.go @@ -182,7 +182,7 @@ type Mutation struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Op MutationKind `protobuf:"varint,1,opt,name=op,proto3,enum=shardkv.MutationKind" json:"op,omitempty"` + Kind MutationKind `protobuf:"varint,1,opt,name=kind,proto3,enum=shardkv.MutationKind" json:"kind,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` } @@ -219,9 +219,9 @@ func (*Mutation) Descriptor() ([]byte, []int) { return file_proto_kv_proto_rawDescGZIP(), []int{0} } -func (x *Mutation) GetOp() MutationKind { +func (x *Mutation) GetKind() MutationKind { if x != nil { - return x.Op + return x.Kind } return MutationKind_Put } @@ -240,250 +240,6 @@ func (x *Mutation) GetValue() []byte { return nil } -type GetArgs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *GetArgs) Reset() { - *x = GetArgs{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetArgs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetArgs) ProtoMessage() {} - -func (x *GetArgs) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[1] - 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 GetArgs.ProtoReflect.Descriptor instead. -func (*GetArgs) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{1} -} - -func (x *GetArgs) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *GetArgs) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -type GetReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Err Err `protobuf:"varint,1,opt,name=err,proto3,enum=shardkv.Err" json:"err,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - LeaderIndex int32 `protobuf:"varint,3,opt,name=leader_index,json=leaderIndex,proto3" json:"leader_index,omitempty"` -} - -func (x *GetReply) Reset() { - *x = GetReply{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetReply) ProtoMessage() {} - -func (x *GetReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[2] - 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 GetReply.ProtoReflect.Descriptor instead. -func (*GetReply) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{2} -} - -func (x *GetReply) GetErr() Err { - if x != nil { - return x.Err - } - return Err_OK -} - -func (x *GetReply) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *GetReply) GetLeaderIndex() int32 { - if x != nil { - return x.LeaderIndex - } - return 0 -} - -type ModifyArgs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Kind string `protobuf:"bytes,2,opt,name=Kind,proto3" json:"Kind,omitempty"` - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *ModifyArgs) Reset() { - *x = ModifyArgs{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModifyArgs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModifyArgs) ProtoMessage() {} - -func (x *ModifyArgs) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_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 ModifyArgs.ProtoReflect.Descriptor instead. -func (*ModifyArgs) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{3} -} - -func (x *ModifyArgs) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *ModifyArgs) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *ModifyArgs) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *ModifyArgs) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type ModifyReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Err Err `protobuf:"varint,1,opt,name=err,proto3,enum=shardkv.Err" json:"err,omitempty"` - LeaderIndex int32 `protobuf:"varint,2,opt,name=leader_index,json=leaderIndex,proto3" json:"leader_index,omitempty"` -} - -func (x *ModifyReply) Reset() { - *x = ModifyReply{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModifyReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModifyReply) ProtoMessage() {} - -func (x *ModifyReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[4] - 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 ModifyReply.ProtoReflect.Descriptor instead. -func (*ModifyReply) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{4} -} - -func (x *ModifyReply) GetErr() Err { - if x != nil { - return x.Err - } - return Err_OK -} - -func (x *ModifyReply) GetLeaderIndex() int32 { - if x != nil { - return x.LeaderIndex - } - return 0 -} - type TxnGetArgs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -497,7 +253,7 @@ type TxnGetArgs struct { func (x *TxnGetArgs) Reset() { *x = TxnGetArgs{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[5] + mi := &file_proto_kv_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -510,7 +266,7 @@ func (x *TxnGetArgs) String() string { func (*TxnGetArgs) ProtoMessage() {} func (x *TxnGetArgs) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[5] + mi := &file_proto_kv_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -523,7 +279,7 @@ func (x *TxnGetArgs) ProtoReflect() protoreflect.Message { // Deprecated: Use TxnGetArgs.ProtoReflect.Descriptor instead. func (*TxnGetArgs) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{5} + return file_proto_kv_proto_rawDescGZIP(), []int{1} } func (x *TxnGetArgs) GetId() int64 { @@ -560,7 +316,7 @@ type TxnGetReply struct { func (x *TxnGetReply) Reset() { *x = TxnGetReply{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[6] + mi := &file_proto_kv_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -573,7 +329,7 @@ func (x *TxnGetReply) String() string { func (*TxnGetReply) ProtoMessage() {} func (x *TxnGetReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[6] + mi := &file_proto_kv_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -586,7 +342,7 @@ func (x *TxnGetReply) ProtoReflect() protoreflect.Message { // Deprecated: Use TxnGetReply.ProtoReflect.Descriptor instead. func (*TxnGetReply) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{6} + return file_proto_kv_proto_rawDescGZIP(), []int{2} } func (x *TxnGetReply) GetErr() Err { @@ -624,7 +380,7 @@ type TxnPrewriteArgs struct { func (x *TxnPrewriteArgs) Reset() { *x = TxnPrewriteArgs{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[7] + mi := &file_proto_kv_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -637,7 +393,7 @@ func (x *TxnPrewriteArgs) String() string { func (*TxnPrewriteArgs) ProtoMessage() {} func (x *TxnPrewriteArgs) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[7] + mi := &file_proto_kv_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -650,7 +406,7 @@ func (x *TxnPrewriteArgs) ProtoReflect() protoreflect.Message { // Deprecated: Use TxnPrewriteArgs.ProtoReflect.Descriptor instead. func (*TxnPrewriteArgs) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{7} + return file_proto_kv_proto_rawDescGZIP(), []int{3} } func (x *TxnPrewriteArgs) GetId() int64 { @@ -693,7 +449,7 @@ type TxnPrewriteReply struct { func (x *TxnPrewriteReply) Reset() { *x = TxnPrewriteReply{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[8] + mi := &file_proto_kv_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -706,7 +462,7 @@ func (x *TxnPrewriteReply) String() string { func (*TxnPrewriteReply) ProtoMessage() {} func (x *TxnPrewriteReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[8] + mi := &file_proto_kv_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -719,7 +475,7 @@ func (x *TxnPrewriteReply) ProtoReflect() protoreflect.Message { // Deprecated: Use TxnPrewriteReply.ProtoReflect.Descriptor instead. func (*TxnPrewriteReply) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{8} + return file_proto_kv_proto_rawDescGZIP(), []int{4} } func (x *TxnPrewriteReply) GetErr() Err { @@ -750,7 +506,7 @@ type TxnCommitArgs struct { func (x *TxnCommitArgs) Reset() { *x = TxnCommitArgs{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[9] + mi := &file_proto_kv_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -763,7 +519,7 @@ func (x *TxnCommitArgs) String() string { func (*TxnCommitArgs) ProtoMessage() {} func (x *TxnCommitArgs) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[9] + mi := &file_proto_kv_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -776,7 +532,7 @@ func (x *TxnCommitArgs) ProtoReflect() protoreflect.Message { // Deprecated: Use TxnCommitArgs.ProtoReflect.Descriptor instead. func (*TxnCommitArgs) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{9} + return file_proto_kv_proto_rawDescGZIP(), []int{5} } func (x *TxnCommitArgs) GetId() int64 { @@ -819,7 +575,7 @@ type TxnCommitReply struct { func (x *TxnCommitReply) Reset() { *x = TxnCommitReply{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[10] + mi := &file_proto_kv_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -832,7 +588,7 @@ func (x *TxnCommitReply) String() string { func (*TxnCommitReply) ProtoMessage() {} func (x *TxnCommitReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[10] + mi := &file_proto_kv_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -845,7 +601,7 @@ func (x *TxnCommitReply) ProtoReflect() protoreflect.Message { // Deprecated: Use TxnCommitReply.ProtoReflect.Descriptor instead. func (*TxnCommitReply) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{10} + return file_proto_kv_proto_rawDescGZIP(), []int{6} } func (x *TxnCommitReply) GetErr() Err { @@ -875,7 +631,7 @@ type TxnRollbackArgs struct { func (x *TxnRollbackArgs) Reset() { *x = TxnRollbackArgs{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[11] + mi := &file_proto_kv_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -888,7 +644,7 @@ func (x *TxnRollbackArgs) String() string { func (*TxnRollbackArgs) ProtoMessage() {} func (x *TxnRollbackArgs) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[11] + mi := &file_proto_kv_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -901,7 +657,7 @@ func (x *TxnRollbackArgs) ProtoReflect() protoreflect.Message { // Deprecated: Use TxnRollbackArgs.ProtoReflect.Descriptor instead. func (*TxnRollbackArgs) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{11} + return file_proto_kv_proto_rawDescGZIP(), []int{7} } func (x *TxnRollbackArgs) GetId() int64 { @@ -937,7 +693,7 @@ type TxnRollbackReply struct { func (x *TxnRollbackReply) Reset() { *x = TxnRollbackReply{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[12] + mi := &file_proto_kv_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -950,7 +706,7 @@ func (x *TxnRollbackReply) String() string { func (*TxnRollbackReply) ProtoMessage() {} func (x *TxnRollbackReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[12] + mi := &file_proto_kv_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -963,7 +719,7 @@ func (x *TxnRollbackReply) ProtoReflect() protoreflect.Message { // Deprecated: Use TxnRollbackReply.ProtoReflect.Descriptor instead. func (*TxnRollbackReply) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{12} + return file_proto_kv_proto_rawDescGZIP(), []int{8} } func (x *TxnRollbackReply) GetErr() Err { @@ -993,7 +749,7 @@ type TxnCheckStatusArgs struct { func (x *TxnCheckStatusArgs) Reset() { *x = TxnCheckStatusArgs{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[13] + mi := &file_proto_kv_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1006,7 +762,7 @@ func (x *TxnCheckStatusArgs) String() string { func (*TxnCheckStatusArgs) ProtoMessage() {} func (x *TxnCheckStatusArgs) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[13] + mi := &file_proto_kv_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1019,7 +775,7 @@ func (x *TxnCheckStatusArgs) ProtoReflect() protoreflect.Message { // Deprecated: Use TxnCheckStatusArgs.ProtoReflect.Descriptor instead. func (*TxnCheckStatusArgs) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{13} + return file_proto_kv_proto_rawDescGZIP(), []int{9} } func (x *TxnCheckStatusArgs) GetId() int64 { @@ -1056,7 +812,7 @@ type TxnCheckStatusReply struct { func (x *TxnCheckStatusReply) Reset() { *x = TxnCheckStatusReply{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[14] + mi := &file_proto_kv_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1069,7 +825,7 @@ func (x *TxnCheckStatusReply) String() string { func (*TxnCheckStatusReply) ProtoMessage() {} func (x *TxnCheckStatusReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[14] + mi := &file_proto_kv_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1082,7 +838,7 @@ func (x *TxnCheckStatusReply) ProtoReflect() protoreflect.Message { // Deprecated: Use TxnCheckStatusReply.ProtoReflect.Descriptor instead. func (*TxnCheckStatusReply) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{14} + return file_proto_kv_proto_rawDescGZIP(), []int{10} } func (x *TxnCheckStatusReply) GetErr() Err { @@ -1117,7 +873,7 @@ type ConfigQueryArgs struct { func (x *ConfigQueryArgs) Reset() { *x = ConfigQueryArgs{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[15] + mi := &file_proto_kv_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1130,7 +886,7 @@ func (x *ConfigQueryArgs) String() string { func (*ConfigQueryArgs) ProtoMessage() {} func (x *ConfigQueryArgs) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[15] + mi := &file_proto_kv_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1143,7 +899,7 @@ func (x *ConfigQueryArgs) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigQueryArgs.ProtoReflect.Descriptor instead. func (*ConfigQueryArgs) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{15} + return file_proto_kv_proto_rawDescGZIP(), []int{11} } func (x *ConfigQueryArgs) GetId() int64 { @@ -1166,7 +922,7 @@ type ConfigQueryReply struct { func (x *ConfigQueryReply) Reset() { *x = ConfigQueryReply{} if protoimpl.UnsafeEnabled { - mi := &file_proto_kv_proto_msgTypes[16] + mi := &file_proto_kv_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1179,7 +935,7 @@ func (x *ConfigQueryReply) String() string { func (*ConfigQueryReply) ProtoMessage() {} func (x *ConfigQueryReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_kv_proto_msgTypes[16] + mi := &file_proto_kv_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1192,7 +948,7 @@ func (x *ConfigQueryReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigQueryReply.ProtoReflect.Descriptor instead. func (*ConfigQueryReply) Descriptor() ([]byte, []int) { - return file_proto_kv_proto_rawDescGZIP(), []int{16} + return file_proto_kv_proto_rawDescGZIP(), []int{12} } func (x *ConfigQueryReply) GetErr() Err { @@ -1220,155 +976,129 @@ var File_proto_kv_proto protoreflect.FileDescriptor var file_proto_kv_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6b, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x22, 0x59, 0x0a, 0x08, 0x4d, 0x75, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x4d, 0x75, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2b, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, + 0x12, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x22, 0x5d, 0x0a, 0x08, 0x4d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x4d, 0x75, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x49, 0x0a, 0x0a, 0x54, 0x78, 0x6e, 0x47, + 0x65, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x22, 0x66, 0x0a, 0x0b, 0x54, 0x78, 0x6e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x0c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x03, 0x65, + 0x72, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x0f, + 0x54, 0x78, 0x6e, 0x50, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x41, 0x72, 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x22, 0x63, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, - 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x58, 0x0a, 0x0a, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, - 0x41, 0x72, 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x50, 0x0a, 0x0b, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, - 0x1e, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, - 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x22, 0x49, 0x0a, 0x0a, 0x54, 0x78, 0x6e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x67, 0x73, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x66, 0x0a, - 0x0b, 0x54, 0x78, 0x6e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x03, - 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x6b, 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x21, 0x0a, 0x0c, - 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x0f, 0x54, 0x78, 0x6e, 0x50, 0x72, 0x65, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x41, 0x72, 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x5f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x54, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x2f, 0x0a, 0x09, 0x6d, 0x75, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6d, - 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x55, 0x0a, 0x10, 0x54, 0x78, 0x6e, 0x50, - 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x03, - 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x6b, 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x21, 0x0a, 0x0c, - 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, - 0x6b, 0x0a, 0x0d, 0x54, 0x78, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, 0x72, 0x67, 0x73, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x53, 0x0a, 0x0e, - 0x54, 0x78, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, - 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x21, - 0x0a, 0x0c, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x22, 0x50, 0x0a, 0x0f, 0x54, 0x78, 0x6e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, - 0x41, 0x72, 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x73, 0x12, - 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, - 0x65, 0x79, 0x73, 0x22, 0x55, 0x0a, 0x10, 0x54, 0x78, 0x6e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x45, - 0x72, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6c, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x60, 0x0a, 0x12, 0x54, 0x78, - 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x72, 0x67, 0x73, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x22, 0x8e, 0x01, 0x0a, - 0x13, 0x54, 0x78, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x2f, 0x0a, + 0x09, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x4d, 0x75, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x55, + 0x0a, 0x10, 0x54, 0x78, 0x6e, 0x50, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x0c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x03, 0x65, + 0x72, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x6b, 0x0a, 0x0d, 0x54, 0x78, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, + 0x79, 0x73, 0x22, 0x53, 0x0a, 0x0e, 0x54, 0x78, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x34, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x21, 0x0a, - 0x0f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x72, 0x67, 0x73, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x6b, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, - 0x03, 0x65, 0x72, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2a, 0x5e, 0x0a, - 0x03, 0x45, 0x72, 0x72, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, - 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, - 0x72, 0x72, 0x4e, 0x6f, 0x4b, 0x65, 0x79, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x72, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x72, - 0x72, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x72, 0x72, - 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x05, 0x2a, 0x2f, 0x0a, - 0x0c, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x07, 0x0a, - 0x03, 0x50, 0x75, 0x74, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, - 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x02, 0x2a, 0x36, - 0x0a, 0x0a, 0x4c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, - 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x64, 0x10, 0x02, 0x32, 0xa8, 0x04, 0x0a, 0x09, 0x4b, 0x76, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x09, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x47, 0x65, - 0x74, 0x12, 0x10, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x72, 0x67, 0x73, 0x1a, 0x11, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x39, 0x0a, 0x0c, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x12, 0x13, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, - 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x14, 0x2e, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x12, 0x39, 0x0a, 0x0c, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x78, 0x6e, 0x47, 0x65, - 0x74, 0x12, 0x13, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x47, - 0x65, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x14, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, - 0x2e, 0x54, 0x78, 0x6e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x48, 0x0a, 0x11, - 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x78, 0x6e, 0x50, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x12, 0x18, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x50, - 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x19, 0x2e, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x50, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x42, 0x0a, 0x0f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x54, 0x78, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x2e, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, 0x72, 0x67, - 0x73, 0x1a, 0x17, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x48, 0x0a, 0x11, 0x48, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x78, 0x6e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, - 0x18, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x52, 0x6f, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x19, 0x2e, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x12, 0x51, 0x0a, 0x14, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x78, - 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1c, 0x2e, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x48, 0x0a, 0x11, 0x48, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x18, 0x2e, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x19, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x7a, 0x6a, 0x72, 0x65, 0x67, 0x65, 0x65, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x50, 0x0a, 0x0f, 0x54, 0x78, 0x6e, 0x52, 0x6f, + 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x41, 0x72, 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x5f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x54, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x55, 0x0a, 0x10, 0x54, 0x78, 0x6e, + 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, + 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x21, 0x0a, + 0x0c, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x22, 0x60, 0x0a, 0x12, 0x54, 0x78, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x41, 0x72, 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, + 0x65, 0x79, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x54, 0x78, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x03, 0x65, 0x72, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, + 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x34, 0x0a, + 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x4c, 0x6f, 0x63, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x21, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x72, 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6b, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x03, 0x65, 0x72, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, + 0x76, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x65, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x2a, 0x5e, 0x0a, 0x03, 0x45, 0x72, 0x72, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, + 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x10, + 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x72, 0x72, 0x4e, 0x6f, 0x4b, 0x65, 0x79, 0x10, 0x02, 0x12, + 0x0f, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x10, 0x04, 0x12, + 0x12, 0x0a, 0x0e, 0x45, 0x72, 0x72, 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x4c, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x10, 0x05, 0x2a, 0x2f, 0x0a, 0x0c, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, + 0x69, 0x6e, 0x64, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x75, 0x74, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x10, 0x02, 0x2a, 0x36, 0x0a, 0x0a, 0x4c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, + 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x10, 0x02, 0x32, 0xbb, 0x03, 0x0a, + 0x09, 0x4b, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x48, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x78, 0x6e, 0x47, 0x65, 0x74, 0x12, 0x13, 0x2e, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, + 0x14, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x48, 0x0a, 0x11, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x54, + 0x78, 0x6e, 0x50, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x50, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x41, 0x72, 0x67, 0x73, 0x1a, 0x19, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, + 0x78, 0x6e, 0x50, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x42, 0x0a, 0x0f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x78, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x12, 0x16, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x17, 0x2e, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x48, 0x0a, 0x11, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x78, 0x6e, + 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x18, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x41, 0x72, + 0x67, 0x73, 0x1a, 0x19, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, + 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x51, 0x0a, + 0x14, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x78, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, + 0x54, 0x78, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x72, + 0x67, 0x73, 0x1a, 0x1c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x54, 0x78, 0x6e, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x48, 0x0a, 0x11, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x18, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, + 0x19, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x7a, 0x6a, 0x72, 0x65, 0x67, 0x65, 0x65, + 0x2f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6b, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1384,62 +1114,52 @@ func file_proto_kv_proto_rawDescGZIP() []byte { } var file_proto_kv_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_proto_kv_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_proto_kv_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_proto_kv_proto_goTypes = []any{ (Err)(0), // 0: shardkv.Err (MutationKind)(0), // 1: shardkv.MutationKind (LockStatus)(0), // 2: shardkv.LockStatus (*Mutation)(nil), // 3: shardkv.Mutation - (*GetArgs)(nil), // 4: shardkv.GetArgs - (*GetReply)(nil), // 5: shardkv.GetReply - (*ModifyArgs)(nil), // 6: shardkv.ModifyArgs - (*ModifyReply)(nil), // 7: shardkv.ModifyReply - (*TxnGetArgs)(nil), // 8: shardkv.TxnGetArgs - (*TxnGetReply)(nil), // 9: shardkv.TxnGetReply - (*TxnPrewriteArgs)(nil), // 10: shardkv.TxnPrewriteArgs - (*TxnPrewriteReply)(nil), // 11: shardkv.TxnPrewriteReply - (*TxnCommitArgs)(nil), // 12: shardkv.TxnCommitArgs - (*TxnCommitReply)(nil), // 13: shardkv.TxnCommitReply - (*TxnRollbackArgs)(nil), // 14: shardkv.TxnRollbackArgs - (*TxnRollbackReply)(nil), // 15: shardkv.TxnRollbackReply - (*TxnCheckStatusArgs)(nil), // 16: shardkv.TxnCheckStatusArgs - (*TxnCheckStatusReply)(nil), // 17: shardkv.TxnCheckStatusReply - (*ConfigQueryArgs)(nil), // 18: shardkv.ConfigQueryArgs - (*ConfigQueryReply)(nil), // 19: shardkv.ConfigQueryReply + (*TxnGetArgs)(nil), // 4: shardkv.TxnGetArgs + (*TxnGetReply)(nil), // 5: shardkv.TxnGetReply + (*TxnPrewriteArgs)(nil), // 6: shardkv.TxnPrewriteArgs + (*TxnPrewriteReply)(nil), // 7: shardkv.TxnPrewriteReply + (*TxnCommitArgs)(nil), // 8: shardkv.TxnCommitArgs + (*TxnCommitReply)(nil), // 9: shardkv.TxnCommitReply + (*TxnRollbackArgs)(nil), // 10: shardkv.TxnRollbackArgs + (*TxnRollbackReply)(nil), // 11: shardkv.TxnRollbackReply + (*TxnCheckStatusArgs)(nil), // 12: shardkv.TxnCheckStatusArgs + (*TxnCheckStatusReply)(nil), // 13: shardkv.TxnCheckStatusReply + (*ConfigQueryArgs)(nil), // 14: shardkv.ConfigQueryArgs + (*ConfigQueryReply)(nil), // 15: shardkv.ConfigQueryReply } var file_proto_kv_proto_depIdxs = []int32{ - 1, // 0: shardkv.Mutation.op:type_name -> shardkv.MutationKind - 0, // 1: shardkv.GetReply.err:type_name -> shardkv.Err - 0, // 2: shardkv.ModifyReply.err:type_name -> shardkv.Err - 0, // 3: shardkv.TxnGetReply.err:type_name -> shardkv.Err - 3, // 4: shardkv.TxnPrewriteArgs.mutations:type_name -> shardkv.Mutation - 0, // 5: shardkv.TxnPrewriteReply.err:type_name -> shardkv.Err - 0, // 6: shardkv.TxnCommitReply.err:type_name -> shardkv.Err - 0, // 7: shardkv.TxnRollbackReply.err:type_name -> shardkv.Err - 0, // 8: shardkv.TxnCheckStatusReply.err:type_name -> shardkv.Err - 2, // 9: shardkv.TxnCheckStatusReply.lock_status:type_name -> shardkv.LockStatus - 0, // 10: shardkv.ConfigQueryReply.err:type_name -> shardkv.Err - 4, // 11: shardkv.KvService.HandleGet:input_type -> shardkv.GetArgs - 6, // 12: shardkv.KvService.HandleModify:input_type -> shardkv.ModifyArgs - 8, // 13: shardkv.KvService.HandleTxnGet:input_type -> shardkv.TxnGetArgs - 10, // 14: shardkv.KvService.HandleTxnPrewrite:input_type -> shardkv.TxnPrewriteArgs - 12, // 15: shardkv.KvService.HandleTxnCommit:input_type -> shardkv.TxnCommitArgs - 14, // 16: shardkv.KvService.HandleTxnRollback:input_type -> shardkv.TxnRollbackArgs - 16, // 17: shardkv.KvService.HandleTxnCheckStatus:input_type -> shardkv.TxnCheckStatusArgs - 18, // 18: shardkv.KvService.HandleConfigQuery:input_type -> shardkv.ConfigQueryArgs - 5, // 19: shardkv.KvService.HandleGet:output_type -> shardkv.GetReply - 7, // 20: shardkv.KvService.HandleModify:output_type -> shardkv.ModifyReply - 9, // 21: shardkv.KvService.HandleTxnGet:output_type -> shardkv.TxnGetReply - 11, // 22: shardkv.KvService.HandleTxnPrewrite:output_type -> shardkv.TxnPrewriteReply - 13, // 23: shardkv.KvService.HandleTxnCommit:output_type -> shardkv.TxnCommitReply - 15, // 24: shardkv.KvService.HandleTxnRollback:output_type -> shardkv.TxnRollbackReply - 17, // 25: shardkv.KvService.HandleTxnCheckStatus:output_type -> shardkv.TxnCheckStatusReply - 19, // 26: shardkv.KvService.HandleConfigQuery:output_type -> shardkv.ConfigQueryReply - 19, // [19:27] is the sub-list for method output_type - 11, // [11:19] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 1, // 0: shardkv.Mutation.kind:type_name -> shardkv.MutationKind + 0, // 1: shardkv.TxnGetReply.err:type_name -> shardkv.Err + 3, // 2: shardkv.TxnPrewriteArgs.mutations:type_name -> shardkv.Mutation + 0, // 3: shardkv.TxnPrewriteReply.err:type_name -> shardkv.Err + 0, // 4: shardkv.TxnCommitReply.err:type_name -> shardkv.Err + 0, // 5: shardkv.TxnRollbackReply.err:type_name -> shardkv.Err + 0, // 6: shardkv.TxnCheckStatusReply.err:type_name -> shardkv.Err + 2, // 7: shardkv.TxnCheckStatusReply.lock_status:type_name -> shardkv.LockStatus + 0, // 8: shardkv.ConfigQueryReply.err:type_name -> shardkv.Err + 4, // 9: shardkv.KvService.HandleTxnGet:input_type -> shardkv.TxnGetArgs + 6, // 10: shardkv.KvService.HandleTxnPrewrite:input_type -> shardkv.TxnPrewriteArgs + 8, // 11: shardkv.KvService.HandleTxnCommit:input_type -> shardkv.TxnCommitArgs + 10, // 12: shardkv.KvService.HandleTxnRollback:input_type -> shardkv.TxnRollbackArgs + 12, // 13: shardkv.KvService.HandleTxnCheckStatus:input_type -> shardkv.TxnCheckStatusArgs + 14, // 14: shardkv.KvService.HandleConfigQuery:input_type -> shardkv.ConfigQueryArgs + 5, // 15: shardkv.KvService.HandleTxnGet:output_type -> shardkv.TxnGetReply + 7, // 16: shardkv.KvService.HandleTxnPrewrite:output_type -> shardkv.TxnPrewriteReply + 9, // 17: shardkv.KvService.HandleTxnCommit:output_type -> shardkv.TxnCommitReply + 11, // 18: shardkv.KvService.HandleTxnRollback:output_type -> shardkv.TxnRollbackReply + 13, // 19: shardkv.KvService.HandleTxnCheckStatus:output_type -> shardkv.TxnCheckStatusReply + 15, // 20: shardkv.KvService.HandleConfigQuery:output_type -> shardkv.ConfigQueryReply + 15, // [15:21] is the sub-list for method output_type + 9, // [9:15] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_proto_kv_proto_init() } @@ -1461,54 +1181,6 @@ func file_proto_kv_proto_init() { } } file_proto_kv_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetArgs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_kv_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_kv_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ModifyArgs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_kv_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ModifyReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_kv_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*TxnGetArgs); i { case 0: return &v.state @@ -1520,7 +1192,7 @@ func file_proto_kv_proto_init() { return nil } } - file_proto_kv_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_proto_kv_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TxnGetReply); i { case 0: return &v.state @@ -1532,7 +1204,7 @@ func file_proto_kv_proto_init() { return nil } } - file_proto_kv_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_proto_kv_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*TxnPrewriteArgs); i { case 0: return &v.state @@ -1544,7 +1216,7 @@ func file_proto_kv_proto_init() { return nil } } - file_proto_kv_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_proto_kv_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*TxnPrewriteReply); i { case 0: return &v.state @@ -1556,7 +1228,7 @@ func file_proto_kv_proto_init() { return nil } } - file_proto_kv_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_proto_kv_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*TxnCommitArgs); i { case 0: return &v.state @@ -1568,7 +1240,7 @@ func file_proto_kv_proto_init() { return nil } } - file_proto_kv_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_proto_kv_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*TxnCommitReply); i { case 0: return &v.state @@ -1580,7 +1252,7 @@ func file_proto_kv_proto_init() { return nil } } - file_proto_kv_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_proto_kv_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*TxnRollbackArgs); i { case 0: return &v.state @@ -1592,7 +1264,7 @@ func file_proto_kv_proto_init() { return nil } } - file_proto_kv_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_proto_kv_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*TxnRollbackReply); i { case 0: return &v.state @@ -1604,7 +1276,7 @@ func file_proto_kv_proto_init() { return nil } } - file_proto_kv_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_proto_kv_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*TxnCheckStatusArgs); i { case 0: return &v.state @@ -1616,7 +1288,7 @@ func file_proto_kv_proto_init() { return nil } } - file_proto_kv_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_proto_kv_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*TxnCheckStatusReply); i { case 0: return &v.state @@ -1628,7 +1300,7 @@ func file_proto_kv_proto_init() { return nil } } - file_proto_kv_proto_msgTypes[15].Exporter = func(v any, i int) any { + file_proto_kv_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*ConfigQueryArgs); i { case 0: return &v.state @@ -1640,7 +1312,7 @@ func file_proto_kv_proto_init() { return nil } } - file_proto_kv_proto_msgTypes[16].Exporter = func(v any, i int) any { + file_proto_kv_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*ConfigQueryReply); i { case 0: return &v.state @@ -1659,7 +1331,7 @@ func file_proto_kv_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_kv_proto_rawDesc, NumEnums: 3, - NumMessages: 17, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/kv.proto b/proto/kv.proto index 4ee0e8e..956ac4e 100644 --- a/proto/kv.proto +++ b/proto/kv.proto @@ -5,8 +5,6 @@ option go_package = "github.com/zjregee/shardkv/proto"; package shardkv; service KvService { - rpc HandleGet (GetArgs) returns (GetReply); - rpc HandleModify (ModifyArgs) returns (ModifyReply); rpc HandleTxnGet(TxnGetArgs) returns (TxnGetReply); rpc HandleTxnPrewrite(TxnPrewriteArgs) returns (TxnPrewriteReply); rpc HandleTxnCommit(TxnCommitArgs) returns (TxnCommitReply); @@ -37,34 +35,11 @@ enum LockStatus { } message Mutation { - MutationKind op = 1; + MutationKind kind = 1; bytes key = 2; bytes value = 3; } -message GetArgs { - int64 id = 1; - string key = 2; -} - -message GetReply { - Err err = 1; - string value = 2; - int32 leader_index = 3; -} - -message ModifyArgs { - int64 id = 1; - string Kind = 2; - string key = 3; - string value = 4; -} - -message ModifyReply { - Err err = 1; - int32 leader_index = 2; -} - message TxnGetArgs { int64 id = 1; uint64 start_ts = 2; diff --git a/proto/kv_grpc.pb.go b/proto/kv_grpc.pb.go index c1dd3c0..93f7188 100644 --- a/proto/kv_grpc.pb.go +++ b/proto/kv_grpc.pb.go @@ -20,8 +20,6 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - KvService_HandleGet_FullMethodName = "/shardkv.KvService/HandleGet" - KvService_HandleModify_FullMethodName = "/shardkv.KvService/HandleModify" KvService_HandleTxnGet_FullMethodName = "/shardkv.KvService/HandleTxnGet" KvService_HandleTxnPrewrite_FullMethodName = "/shardkv.KvService/HandleTxnPrewrite" KvService_HandleTxnCommit_FullMethodName = "/shardkv.KvService/HandleTxnCommit" @@ -34,8 +32,6 @@ 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 KvServiceClient interface { - HandleGet(ctx context.Context, in *GetArgs, opts ...grpc.CallOption) (*GetReply, error) - HandleModify(ctx context.Context, in *ModifyArgs, opts ...grpc.CallOption) (*ModifyReply, error) HandleTxnGet(ctx context.Context, in *TxnGetArgs, opts ...grpc.CallOption) (*TxnGetReply, error) HandleTxnPrewrite(ctx context.Context, in *TxnPrewriteArgs, opts ...grpc.CallOption) (*TxnPrewriteReply, error) HandleTxnCommit(ctx context.Context, in *TxnCommitArgs, opts ...grpc.CallOption) (*TxnCommitReply, error) @@ -52,26 +48,6 @@ func NewKvServiceClient(cc grpc.ClientConnInterface) KvServiceClient { return &kvServiceClient{cc} } -func (c *kvServiceClient) HandleGet(ctx context.Context, in *GetArgs, opts ...grpc.CallOption) (*GetReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetReply) - err := c.cc.Invoke(ctx, KvService_HandleGet_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kvServiceClient) HandleModify(ctx context.Context, in *ModifyArgs, opts ...grpc.CallOption) (*ModifyReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ModifyReply) - err := c.cc.Invoke(ctx, KvService_HandleModify_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *kvServiceClient) HandleTxnGet(ctx context.Context, in *TxnGetArgs, opts ...grpc.CallOption) (*TxnGetReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(TxnGetReply) @@ -136,8 +112,6 @@ func (c *kvServiceClient) HandleConfigQuery(ctx context.Context, in *ConfigQuery // All implementations must embed UnimplementedKvServiceServer // for forward compatibility. type KvServiceServer interface { - HandleGet(context.Context, *GetArgs) (*GetReply, error) - HandleModify(context.Context, *ModifyArgs) (*ModifyReply, error) HandleTxnGet(context.Context, *TxnGetArgs) (*TxnGetReply, error) HandleTxnPrewrite(context.Context, *TxnPrewriteArgs) (*TxnPrewriteReply, error) HandleTxnCommit(context.Context, *TxnCommitArgs) (*TxnCommitReply, error) @@ -154,12 +128,6 @@ type KvServiceServer interface { // pointer dereference when methods are called. type UnimplementedKvServiceServer struct{} -func (UnimplementedKvServiceServer) HandleGet(context.Context, *GetArgs) (*GetReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method HandleGet not implemented") -} -func (UnimplementedKvServiceServer) HandleModify(context.Context, *ModifyArgs) (*ModifyReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method HandleModify not implemented") -} func (UnimplementedKvServiceServer) HandleTxnGet(context.Context, *TxnGetArgs) (*TxnGetReply, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleTxnGet not implemented") } @@ -199,42 +167,6 @@ func RegisterKvServiceServer(s grpc.ServiceRegistrar, srv KvServiceServer) { s.RegisterService(&KvService_ServiceDesc, srv) } -func _KvService_HandleGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetArgs) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KvServiceServer).HandleGet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: KvService_HandleGet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KvServiceServer).HandleGet(ctx, req.(*GetArgs)) - } - return interceptor(ctx, in, info, handler) -} - -func _KvService_HandleModify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyArgs) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KvServiceServer).HandleModify(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: KvService_HandleModify_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KvServiceServer).HandleModify(ctx, req.(*ModifyArgs)) - } - return interceptor(ctx, in, info, handler) -} - func _KvService_HandleTxnGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TxnGetArgs) if err := dec(in); err != nil { @@ -350,14 +282,6 @@ var KvService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "shardkv.KvService", HandlerType: (*KvServiceServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "HandleGet", - Handler: _KvService_HandleGet_Handler, - }, - { - MethodName: "HandleModify", - Handler: _KvService_HandleModify_Handler, - }, { MethodName: "HandleTxnGet", Handler: _KvService_HandleTxnGet_Handler,