From 4a1ac2fa65b04bbdb56e4f39e24a737959c0c332 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 13 Sep 2022 13:28:08 +0300 Subject: [PATCH] [#1731] services/control: Allow to evacuate data from shard Signed-off-by: Evgenii Stratonikov --- pkg/services/control/convert.go | 18 + pkg/services/control/ir/service.pb.go | 7 +- pkg/services/control/ir/service_grpc.pb.go | 3 +- pkg/services/control/ir/types.pb.go | 7 +- pkg/services/control/rpc.go | 14 + pkg/services/control/server/evacuate.go | 41 ++ pkg/services/control/service.pb.go | 693 +++++++++++++++------ pkg/services/control/service.proto | 30 + pkg/services/control/service_grpc.pb.go | 41 +- pkg/services/control/service_neofs.pb.go | 162 +++++ pkg/services/control/types.pb.go | 7 +- 11 files changed, 812 insertions(+), 211 deletions(-) create mode 100644 pkg/services/control/server/evacuate.go diff --git a/pkg/services/control/convert.go b/pkg/services/control/convert.go index a4d0bced62..373bbabeec 100644 --- a/pkg/services/control/convert.go +++ b/pkg/services/control/convert.go @@ -184,3 +184,21 @@ func (w *synchronizeTreeResponseWrapper) FromGRPCMessage(m grpc.Message) error { w.SynchronizeTreeResponse = r return nil } + +type evacuateShardResponseWrapper struct { + *EvacuateShardResponse +} + +func (w *evacuateShardResponseWrapper) ToGRPCMessage() grpc.Message { + return w.EvacuateShardResponse +} + +func (w *evacuateShardResponseWrapper) FromGRPCMessage(m grpc.Message) error { + r, ok := m.(*EvacuateShardResponse) + if !ok { + return message.NewUnexpectedMessageType(m, (*EvacuateShardResponse)(nil)) + } + + w.EvacuateShardResponse = r + return nil +} diff --git a/pkg/services/control/ir/service.pb.go b/pkg/services/control/ir/service.pb.go index 73bf274e26..8d3c40a410 100644 --- a/pkg/services/control/ir/service.pb.go +++ b/pkg/services/control/ir/service.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.2 +// protoc v3.21.5 // source: pkg/services/control/ir/service.proto package control import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/services/control/ir/service_grpc.pb.go b/pkg/services/control/ir/service_grpc.pb.go index def51dacdf..3753fae5c6 100644 --- a/pkg/services/control/ir/service_grpc.pb.go +++ b/pkg/services/control/ir/service_grpc.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.2 +// - protoc v3.21.5 // source: pkg/services/control/ir/service.proto package control import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/pkg/services/control/ir/types.pb.go b/pkg/services/control/ir/types.pb.go index 4d18a22668..a71db09691 100644 --- a/pkg/services/control/ir/types.pb.go +++ b/pkg/services/control/ir/types.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.2 +// protoc v3.21.5 // source: pkg/services/control/ir/types.proto package control import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/services/control/rpc.go b/pkg/services/control/rpc.go index 13751e692f..20b4df9804 100644 --- a/pkg/services/control/rpc.go +++ b/pkg/services/control/rpc.go @@ -17,6 +17,7 @@ const ( rpcDumpShard = "DumpShard" rpcRestoreShard = "RestoreShard" rpcSynchronizeTree = "SynchronizeTree" + rpcEvacuateShard = "EvacuateShard" ) // HealthCheck executes ControlService.HealthCheck RPC. @@ -186,3 +187,16 @@ func SynchronizeTree(cli *client.Client, req *SynchronizeTreeRequest, opts ...cl return wResp.SynchronizeTreeResponse, nil } + +// EvacuateShard executes ControlService.EvacuateShard RPC. +func EvacuateShard(cli *client.Client, req *EvacuateShardRequest, opts ...client.CallOption) (*EvacuateShardResponse, error) { + wResp := &evacuateShardResponseWrapper{new(EvacuateShardResponse)} + wReq := &requestWrapper{m: req} + + err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcEvacuateShard), wReq, wResp, opts...) + if err != nil { + return nil, err + } + + return wResp.EvacuateShardResponse, nil +} diff --git a/pkg/services/control/server/evacuate.go b/pkg/services/control/server/evacuate.go new file mode 100644 index 0000000000..8208a00ab2 --- /dev/null +++ b/pkg/services/control/server/evacuate.go @@ -0,0 +1,41 @@ +package control + +import ( + "context" + + "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine" + "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + "github.com/nspcc-dev/neofs-node/pkg/services/control" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (s *Server) EvacuateShard(_ context.Context, req *control.EvacuateShardRequest) (*control.EvacuateShardResponse, error) { + err := s.isValidRequest(req) + if err != nil { + return nil, status.Error(codes.PermissionDenied, err.Error()) + } + + shardID := shard.NewIDFromBytes(req.GetBody().GetShard_ID()) + + var prm engine.EvacuateShardPrm + prm.WithShardID(shardID) + prm.WithIgnoreErrors(req.GetBody().GetIgnoreErrors()) + + res, err := s.s.Evacuate(prm) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + resp := &control.EvacuateShardResponse{ + Body: &control.EvacuateShardResponse_Body{ + Count: uint32(res.Count()), + }, + } + + err = SignMessage(s.key, resp) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + return resp, nil +} diff --git a/pkg/services/control/service.pb.go b/pkg/services/control/service.pb.go index 96a55b3791..919642a90c 100644 --- a/pkg/services/control/service.pb.go +++ b/pkg/services/control/service.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.2 +// protoc v3.21.5 // source: pkg/services/control/service.proto package control import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -1065,6 +1064,118 @@ func (x *SynchronizeTreeResponse) GetSignature() *Signature { return nil } +// EvacuateShard request. +type EvacuateShardRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Body *EvacuateShardRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *EvacuateShardRequest) Reset() { + *x = EvacuateShardRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_services_control_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvacuateShardRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvacuateShardRequest) ProtoMessage() {} + +func (x *EvacuateShardRequest) ProtoReflect() protoreflect.Message { + mi := &file_pkg_services_control_service_proto_msgTypes[18] + 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 EvacuateShardRequest.ProtoReflect.Descriptor instead. +func (*EvacuateShardRequest) Descriptor() ([]byte, []int) { + return file_pkg_services_control_service_proto_rawDescGZIP(), []int{18} +} + +func (x *EvacuateShardRequest) GetBody() *EvacuateShardRequest_Body { + if x != nil { + return x.Body + } + return nil +} + +func (x *EvacuateShardRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + +// EvacuateShard response. +type EvacuateShardResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Body *EvacuateShardResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *EvacuateShardResponse) Reset() { + *x = EvacuateShardResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_services_control_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvacuateShardResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvacuateShardResponse) ProtoMessage() {} + +func (x *EvacuateShardResponse) ProtoReflect() protoreflect.Message { + mi := &file_pkg_services_control_service_proto_msgTypes[19] + 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 EvacuateShardResponse.ProtoReflect.Descriptor instead. +func (*EvacuateShardResponse) Descriptor() ([]byte, []int) { + return file_pkg_services_control_service_proto_rawDescGZIP(), []int{19} +} + +func (x *EvacuateShardResponse) GetBody() *EvacuateShardResponse_Body { + if x != nil { + return x.Body + } + return nil +} + +func (x *EvacuateShardResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + // Health check request body. type HealthCheckRequest_Body struct { state protoimpl.MessageState @@ -1075,7 +1186,7 @@ type HealthCheckRequest_Body struct { func (x *HealthCheckRequest_Body) Reset() { *x = HealthCheckRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[18] + mi := &file_pkg_services_control_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1088,7 +1199,7 @@ func (x *HealthCheckRequest_Body) String() string { func (*HealthCheckRequest_Body) ProtoMessage() {} func (x *HealthCheckRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[18] + mi := &file_pkg_services_control_service_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1119,7 +1230,7 @@ type HealthCheckResponse_Body struct { func (x *HealthCheckResponse_Body) Reset() { *x = HealthCheckResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[19] + mi := &file_pkg_services_control_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1132,7 +1243,7 @@ func (x *HealthCheckResponse_Body) String() string { func (*HealthCheckResponse_Body) ProtoMessage() {} func (x *HealthCheckResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[19] + mi := &file_pkg_services_control_service_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1172,7 +1283,7 @@ type NetmapSnapshotRequest_Body struct { func (x *NetmapSnapshotRequest_Body) Reset() { *x = NetmapSnapshotRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[20] + mi := &file_pkg_services_control_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1185,7 +1296,7 @@ func (x *NetmapSnapshotRequest_Body) String() string { func (*NetmapSnapshotRequest_Body) ProtoMessage() {} func (x *NetmapSnapshotRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[20] + mi := &file_pkg_services_control_service_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1214,7 +1325,7 @@ type NetmapSnapshotResponse_Body struct { func (x *NetmapSnapshotResponse_Body) Reset() { *x = NetmapSnapshotResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[21] + mi := &file_pkg_services_control_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1227,7 +1338,7 @@ func (x *NetmapSnapshotResponse_Body) String() string { func (*NetmapSnapshotResponse_Body) ProtoMessage() {} func (x *NetmapSnapshotResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[21] + mi := &file_pkg_services_control_service_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1263,7 +1374,7 @@ type SetNetmapStatusRequest_Body struct { func (x *SetNetmapStatusRequest_Body) Reset() { *x = SetNetmapStatusRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[22] + mi := &file_pkg_services_control_service_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1276,7 +1387,7 @@ func (x *SetNetmapStatusRequest_Body) String() string { func (*SetNetmapStatusRequest_Body) ProtoMessage() {} func (x *SetNetmapStatusRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[22] + mi := &file_pkg_services_control_service_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1309,7 +1420,7 @@ type SetNetmapStatusResponse_Body struct { func (x *SetNetmapStatusResponse_Body) Reset() { *x = SetNetmapStatusResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[23] + mi := &file_pkg_services_control_service_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1322,7 +1433,7 @@ func (x *SetNetmapStatusResponse_Body) String() string { func (*SetNetmapStatusResponse_Body) ProtoMessage() {} func (x *SetNetmapStatusResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[23] + mi := &file_pkg_services_control_service_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1352,7 +1463,7 @@ type DropObjectsRequest_Body struct { func (x *DropObjectsRequest_Body) Reset() { *x = DropObjectsRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[24] + mi := &file_pkg_services_control_service_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1365,7 +1476,7 @@ func (x *DropObjectsRequest_Body) String() string { func (*DropObjectsRequest_Body) ProtoMessage() {} func (x *DropObjectsRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[24] + mi := &file_pkg_services_control_service_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1398,7 +1509,7 @@ type DropObjectsResponse_Body struct { func (x *DropObjectsResponse_Body) Reset() { *x = DropObjectsResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[25] + mi := &file_pkg_services_control_service_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1411,7 +1522,7 @@ func (x *DropObjectsResponse_Body) String() string { func (*DropObjectsResponse_Body) ProtoMessage() {} func (x *DropObjectsResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[25] + mi := &file_pkg_services_control_service_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1437,7 +1548,7 @@ type ListShardsRequest_Body struct { func (x *ListShardsRequest_Body) Reset() { *x = ListShardsRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[26] + mi := &file_pkg_services_control_service_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1450,7 +1561,7 @@ func (x *ListShardsRequest_Body) String() string { func (*ListShardsRequest_Body) ProtoMessage() {} func (x *ListShardsRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[26] + mi := &file_pkg_services_control_service_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1479,7 +1590,7 @@ type ListShardsResponse_Body struct { func (x *ListShardsResponse_Body) Reset() { *x = ListShardsResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[27] + mi := &file_pkg_services_control_service_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1492,7 +1603,7 @@ func (x *ListShardsResponse_Body) String() string { func (*ListShardsResponse_Body) ProtoMessage() {} func (x *ListShardsResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[27] + mi := &file_pkg_services_control_service_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1532,7 +1643,7 @@ type SetShardModeRequest_Body struct { func (x *SetShardModeRequest_Body) Reset() { *x = SetShardModeRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[28] + mi := &file_pkg_services_control_service_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1545,7 +1656,7 @@ func (x *SetShardModeRequest_Body) String() string { func (*SetShardModeRequest_Body) ProtoMessage() {} func (x *SetShardModeRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[28] + mi := &file_pkg_services_control_service_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1592,7 +1703,7 @@ type SetShardModeResponse_Body struct { func (x *SetShardModeResponse_Body) Reset() { *x = SetShardModeResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[29] + mi := &file_pkg_services_control_service_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1605,7 +1716,7 @@ func (x *SetShardModeResponse_Body) String() string { func (*SetShardModeResponse_Body) ProtoMessage() {} func (x *SetShardModeResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[29] + mi := &file_pkg_services_control_service_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1638,7 +1749,7 @@ type DumpShardRequest_Body struct { func (x *DumpShardRequest_Body) Reset() { *x = DumpShardRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[30] + mi := &file_pkg_services_control_service_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1651,7 +1762,7 @@ func (x *DumpShardRequest_Body) String() string { func (*DumpShardRequest_Body) ProtoMessage() {} func (x *DumpShardRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[30] + mi := &file_pkg_services_control_service_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1698,7 +1809,7 @@ type DumpShardResponse_Body struct { func (x *DumpShardResponse_Body) Reset() { *x = DumpShardResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[31] + mi := &file_pkg_services_control_service_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1711,7 +1822,7 @@ func (x *DumpShardResponse_Body) String() string { func (*DumpShardResponse_Body) ProtoMessage() {} func (x *DumpShardResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[31] + mi := &file_pkg_services_control_service_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1744,7 +1855,7 @@ type RestoreShardRequest_Body struct { func (x *RestoreShardRequest_Body) Reset() { *x = RestoreShardRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[32] + mi := &file_pkg_services_control_service_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1757,7 +1868,7 @@ func (x *RestoreShardRequest_Body) String() string { func (*RestoreShardRequest_Body) ProtoMessage() {} func (x *RestoreShardRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[32] + mi := &file_pkg_services_control_service_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1804,7 +1915,7 @@ type RestoreShardResponse_Body struct { func (x *RestoreShardResponse_Body) Reset() { *x = RestoreShardResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[33] + mi := &file_pkg_services_control_service_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1817,7 +1928,7 @@ func (x *RestoreShardResponse_Body) String() string { func (*RestoreShardResponse_Body) ProtoMessage() {} func (x *RestoreShardResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[33] + mi := &file_pkg_services_control_service_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1848,7 +1959,7 @@ type SynchronizeTreeRequest_Body struct { func (x *SynchronizeTreeRequest_Body) Reset() { *x = SynchronizeTreeRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[34] + mi := &file_pkg_services_control_service_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1861,7 +1972,7 @@ func (x *SynchronizeTreeRequest_Body) String() string { func (*SynchronizeTreeRequest_Body) ProtoMessage() {} func (x *SynchronizeTreeRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[34] + mi := &file_pkg_services_control_service_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1908,7 +2019,7 @@ type SynchronizeTreeResponse_Body struct { func (x *SynchronizeTreeResponse_Body) Reset() { *x = SynchronizeTreeResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[35] + mi := &file_pkg_services_control_service_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1921,7 +2032,7 @@ func (x *SynchronizeTreeResponse_Body) String() string { func (*SynchronizeTreeResponse_Body) ProtoMessage() {} func (x *SynchronizeTreeResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[35] + mi := &file_pkg_services_control_service_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1937,6 +2048,112 @@ func (*SynchronizeTreeResponse_Body) Descriptor() ([]byte, []int) { return file_pkg_services_control_service_proto_rawDescGZIP(), []int{17, 0} } +// Request body structure. +type EvacuateShardRequest_Body struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the shard. + Shard_ID []byte `protobuf:"bytes,1,opt,name=shard_ID,json=shardID,proto3" json:"shard_ID,omitempty"` + // Flag indicating whether object read errors should be ignored. + IgnoreErrors bool `protobuf:"varint,2,opt,name=ignore_errors,json=ignoreErrors,proto3" json:"ignore_errors,omitempty"` +} + +func (x *EvacuateShardRequest_Body) Reset() { + *x = EvacuateShardRequest_Body{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_services_control_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvacuateShardRequest_Body) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvacuateShardRequest_Body) ProtoMessage() {} + +func (x *EvacuateShardRequest_Body) ProtoReflect() protoreflect.Message { + mi := &file_pkg_services_control_service_proto_msgTypes[38] + 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 EvacuateShardRequest_Body.ProtoReflect.Descriptor instead. +func (*EvacuateShardRequest_Body) Descriptor() ([]byte, []int) { + return file_pkg_services_control_service_proto_rawDescGZIP(), []int{18, 0} +} + +func (x *EvacuateShardRequest_Body) GetShard_ID() []byte { + if x != nil { + return x.Shard_ID + } + return nil +} + +func (x *EvacuateShardRequest_Body) GetIgnoreErrors() bool { + if x != nil { + return x.IgnoreErrors + } + return false +} + +// Response body structure. +type EvacuateShardResponse_Body struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *EvacuateShardResponse_Body) Reset() { + *x = EvacuateShardResponse_Body{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_services_control_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvacuateShardResponse_Body) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvacuateShardResponse_Body) ProtoMessage() {} + +func (x *EvacuateShardResponse_Body) ProtoReflect() protoreflect.Message { + mi := &file_pkg_services_control_service_proto_msgTypes[39] + 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 EvacuateShardResponse_Body.ProtoReflect.Descriptor instead. +func (*EvacuateShardResponse_Body) Descriptor() ([]byte, []int) { + return file_pkg_services_control_service_proto_rawDescGZIP(), []int{19, 0} +} + +func (x *EvacuateShardResponse_Body) GetCount() uint32 { + if x != nil { + return x.Count + } + return 0 +} + var File_pkg_services_control_service_proto protoreflect.FileDescriptor var file_pkg_services_control_service_proto_rawDesc = []byte{ @@ -2142,55 +2359,83 @@ var file_pkg_services_control_service_proto_rawDesc = []byte{ 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, - 0x6f, 0x64, 0x79, 0x32, 0xc8, 0x05, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x51, 0x0a, 0x0e, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x74, - 0x6d, 0x61, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x74, - 0x6d, 0x61, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x44, 0x72, 0x6f, - 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x73, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x65, - 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x64, 0x79, 0x22, 0xc8, 0x01, 0x0a, 0x14, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x46, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x19, + 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x44, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xa0, + 0x01, 0x0a, 0x15, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2e, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x1a, 0x1c, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x32, 0x98, 0x06, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, + 0x0a, 0x0e, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x74, 0x6d, 0x61, + 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x74, 0x6d, 0x61, + 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, + 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x44, 0x72, 0x6f, 0x70, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x72, + 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, + 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x44, 0x75, 0x6d, 0x70, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, - 0x75, 0x6d, 0x70, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x75, 0x6d, 0x70, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x52, - 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x44, 0x75, 0x6d, 0x70, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x75, 0x6d, + 0x70, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x75, 0x6d, 0x70, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x52, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, - 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x54, 0x72, 0x65, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, - 0x65, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, - 0x7a, 0x65, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, - 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x73, 0x70, - 0x63, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x2d, 0x6e, 0x6f, 0x64, - 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, + 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x54, 0x72, 0x65, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x54, + 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, + 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0d, + 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1d, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x73, 0x70, 0x63, 0x63, + 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2205,7 +2450,7 @@ func file_pkg_services_control_service_proto_rawDescGZIP() []byte { return file_pkg_services_control_service_proto_rawDescData } -var file_pkg_services_control_service_proto_msgTypes = make([]protoimpl.MessageInfo, 36) +var file_pkg_services_control_service_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_pkg_services_control_service_proto_goTypes = []interface{}{ (*HealthCheckRequest)(nil), // 0: control.HealthCheckRequest (*HealthCheckResponse)(nil), // 1: control.HealthCheckResponse @@ -2225,97 +2470,107 @@ var file_pkg_services_control_service_proto_goTypes = []interface{}{ (*RestoreShardResponse)(nil), // 15: control.RestoreShardResponse (*SynchronizeTreeRequest)(nil), // 16: control.SynchronizeTreeRequest (*SynchronizeTreeResponse)(nil), // 17: control.SynchronizeTreeResponse - (*HealthCheckRequest_Body)(nil), // 18: control.HealthCheckRequest.Body - (*HealthCheckResponse_Body)(nil), // 19: control.HealthCheckResponse.Body - (*NetmapSnapshotRequest_Body)(nil), // 20: control.NetmapSnapshotRequest.Body - (*NetmapSnapshotResponse_Body)(nil), // 21: control.NetmapSnapshotResponse.Body - (*SetNetmapStatusRequest_Body)(nil), // 22: control.SetNetmapStatusRequest.Body - (*SetNetmapStatusResponse_Body)(nil), // 23: control.SetNetmapStatusResponse.Body - (*DropObjectsRequest_Body)(nil), // 24: control.DropObjectsRequest.Body - (*DropObjectsResponse_Body)(nil), // 25: control.DropObjectsResponse.Body - (*ListShardsRequest_Body)(nil), // 26: control.ListShardsRequest.Body - (*ListShardsResponse_Body)(nil), // 27: control.ListShardsResponse.Body - (*SetShardModeRequest_Body)(nil), // 28: control.SetShardModeRequest.Body - (*SetShardModeResponse_Body)(nil), // 29: control.SetShardModeResponse.Body - (*DumpShardRequest_Body)(nil), // 30: control.DumpShardRequest.Body - (*DumpShardResponse_Body)(nil), // 31: control.DumpShardResponse.Body - (*RestoreShardRequest_Body)(nil), // 32: control.RestoreShardRequest.Body - (*RestoreShardResponse_Body)(nil), // 33: control.RestoreShardResponse.Body - (*SynchronizeTreeRequest_Body)(nil), // 34: control.SynchronizeTreeRequest.Body - (*SynchronizeTreeResponse_Body)(nil), // 35: control.SynchronizeTreeResponse.Body - (*Signature)(nil), // 36: control.Signature - (NetmapStatus)(0), // 37: control.NetmapStatus - (HealthStatus)(0), // 38: control.HealthStatus - (*Netmap)(nil), // 39: control.Netmap - (*ShardInfo)(nil), // 40: control.ShardInfo - (ShardMode)(0), // 41: control.ShardMode + (*EvacuateShardRequest)(nil), // 18: control.EvacuateShardRequest + (*EvacuateShardResponse)(nil), // 19: control.EvacuateShardResponse + (*HealthCheckRequest_Body)(nil), // 20: control.HealthCheckRequest.Body + (*HealthCheckResponse_Body)(nil), // 21: control.HealthCheckResponse.Body + (*NetmapSnapshotRequest_Body)(nil), // 22: control.NetmapSnapshotRequest.Body + (*NetmapSnapshotResponse_Body)(nil), // 23: control.NetmapSnapshotResponse.Body + (*SetNetmapStatusRequest_Body)(nil), // 24: control.SetNetmapStatusRequest.Body + (*SetNetmapStatusResponse_Body)(nil), // 25: control.SetNetmapStatusResponse.Body + (*DropObjectsRequest_Body)(nil), // 26: control.DropObjectsRequest.Body + (*DropObjectsResponse_Body)(nil), // 27: control.DropObjectsResponse.Body + (*ListShardsRequest_Body)(nil), // 28: control.ListShardsRequest.Body + (*ListShardsResponse_Body)(nil), // 29: control.ListShardsResponse.Body + (*SetShardModeRequest_Body)(nil), // 30: control.SetShardModeRequest.Body + (*SetShardModeResponse_Body)(nil), // 31: control.SetShardModeResponse.Body + (*DumpShardRequest_Body)(nil), // 32: control.DumpShardRequest.Body + (*DumpShardResponse_Body)(nil), // 33: control.DumpShardResponse.Body + (*RestoreShardRequest_Body)(nil), // 34: control.RestoreShardRequest.Body + (*RestoreShardResponse_Body)(nil), // 35: control.RestoreShardResponse.Body + (*SynchronizeTreeRequest_Body)(nil), // 36: control.SynchronizeTreeRequest.Body + (*SynchronizeTreeResponse_Body)(nil), // 37: control.SynchronizeTreeResponse.Body + (*EvacuateShardRequest_Body)(nil), // 38: control.EvacuateShardRequest.Body + (*EvacuateShardResponse_Body)(nil), // 39: control.EvacuateShardResponse.Body + (*Signature)(nil), // 40: control.Signature + (NetmapStatus)(0), // 41: control.NetmapStatus + (HealthStatus)(0), // 42: control.HealthStatus + (*Netmap)(nil), // 43: control.Netmap + (*ShardInfo)(nil), // 44: control.ShardInfo + (ShardMode)(0), // 45: control.ShardMode } var file_pkg_services_control_service_proto_depIdxs = []int32{ - 18, // 0: control.HealthCheckRequest.body:type_name -> control.HealthCheckRequest.Body - 36, // 1: control.HealthCheckRequest.signature:type_name -> control.Signature - 19, // 2: control.HealthCheckResponse.body:type_name -> control.HealthCheckResponse.Body - 36, // 3: control.HealthCheckResponse.signature:type_name -> control.Signature - 20, // 4: control.NetmapSnapshotRequest.body:type_name -> control.NetmapSnapshotRequest.Body - 36, // 5: control.NetmapSnapshotRequest.signature:type_name -> control.Signature - 21, // 6: control.NetmapSnapshotResponse.body:type_name -> control.NetmapSnapshotResponse.Body - 36, // 7: control.NetmapSnapshotResponse.signature:type_name -> control.Signature - 22, // 8: control.SetNetmapStatusRequest.body:type_name -> control.SetNetmapStatusRequest.Body - 36, // 9: control.SetNetmapStatusRequest.signature:type_name -> control.Signature - 23, // 10: control.SetNetmapStatusResponse.body:type_name -> control.SetNetmapStatusResponse.Body - 36, // 11: control.SetNetmapStatusResponse.signature:type_name -> control.Signature - 24, // 12: control.DropObjectsRequest.body:type_name -> control.DropObjectsRequest.Body - 36, // 13: control.DropObjectsRequest.signature:type_name -> control.Signature - 25, // 14: control.DropObjectsResponse.body:type_name -> control.DropObjectsResponse.Body - 36, // 15: control.DropObjectsResponse.signature:type_name -> control.Signature - 26, // 16: control.ListShardsRequest.body:type_name -> control.ListShardsRequest.Body - 36, // 17: control.ListShardsRequest.signature:type_name -> control.Signature - 27, // 18: control.ListShardsResponse.body:type_name -> control.ListShardsResponse.Body - 36, // 19: control.ListShardsResponse.signature:type_name -> control.Signature - 28, // 20: control.SetShardModeRequest.body:type_name -> control.SetShardModeRequest.Body - 36, // 21: control.SetShardModeRequest.signature:type_name -> control.Signature - 29, // 22: control.SetShardModeResponse.body:type_name -> control.SetShardModeResponse.Body - 36, // 23: control.SetShardModeResponse.signature:type_name -> control.Signature - 30, // 24: control.DumpShardRequest.body:type_name -> control.DumpShardRequest.Body - 36, // 25: control.DumpShardRequest.signature:type_name -> control.Signature - 31, // 26: control.DumpShardResponse.body:type_name -> control.DumpShardResponse.Body - 36, // 27: control.DumpShardResponse.signature:type_name -> control.Signature - 32, // 28: control.RestoreShardRequest.body:type_name -> control.RestoreShardRequest.Body - 36, // 29: control.RestoreShardRequest.signature:type_name -> control.Signature - 33, // 30: control.RestoreShardResponse.body:type_name -> control.RestoreShardResponse.Body - 36, // 31: control.RestoreShardResponse.signature:type_name -> control.Signature - 34, // 32: control.SynchronizeTreeRequest.body:type_name -> control.SynchronizeTreeRequest.Body - 36, // 33: control.SynchronizeTreeRequest.signature:type_name -> control.Signature - 35, // 34: control.SynchronizeTreeResponse.body:type_name -> control.SynchronizeTreeResponse.Body - 36, // 35: control.SynchronizeTreeResponse.signature:type_name -> control.Signature - 37, // 36: control.HealthCheckResponse.Body.netmap_status:type_name -> control.NetmapStatus - 38, // 37: control.HealthCheckResponse.Body.health_status:type_name -> control.HealthStatus - 39, // 38: control.NetmapSnapshotResponse.Body.netmap:type_name -> control.Netmap - 37, // 39: control.SetNetmapStatusRequest.Body.status:type_name -> control.NetmapStatus - 40, // 40: control.ListShardsResponse.Body.shards:type_name -> control.ShardInfo - 41, // 41: control.SetShardModeRequest.Body.mode:type_name -> control.ShardMode - 0, // 42: control.ControlService.HealthCheck:input_type -> control.HealthCheckRequest - 2, // 43: control.ControlService.NetmapSnapshot:input_type -> control.NetmapSnapshotRequest - 4, // 44: control.ControlService.SetNetmapStatus:input_type -> control.SetNetmapStatusRequest - 6, // 45: control.ControlService.DropObjects:input_type -> control.DropObjectsRequest - 8, // 46: control.ControlService.ListShards:input_type -> control.ListShardsRequest - 10, // 47: control.ControlService.SetShardMode:input_type -> control.SetShardModeRequest - 12, // 48: control.ControlService.DumpShard:input_type -> control.DumpShardRequest - 14, // 49: control.ControlService.RestoreShard:input_type -> control.RestoreShardRequest - 16, // 50: control.ControlService.SynchronizeTree:input_type -> control.SynchronizeTreeRequest - 1, // 51: control.ControlService.HealthCheck:output_type -> control.HealthCheckResponse - 3, // 52: control.ControlService.NetmapSnapshot:output_type -> control.NetmapSnapshotResponse - 5, // 53: control.ControlService.SetNetmapStatus:output_type -> control.SetNetmapStatusResponse - 7, // 54: control.ControlService.DropObjects:output_type -> control.DropObjectsResponse - 9, // 55: control.ControlService.ListShards:output_type -> control.ListShardsResponse - 11, // 56: control.ControlService.SetShardMode:output_type -> control.SetShardModeResponse - 13, // 57: control.ControlService.DumpShard:output_type -> control.DumpShardResponse - 15, // 58: control.ControlService.RestoreShard:output_type -> control.RestoreShardResponse - 17, // 59: control.ControlService.SynchronizeTree:output_type -> control.SynchronizeTreeResponse - 51, // [51:60] is the sub-list for method output_type - 42, // [42:51] is the sub-list for method input_type - 42, // [42:42] is the sub-list for extension type_name - 42, // [42:42] is the sub-list for extension extendee - 0, // [0:42] is the sub-list for field type_name + 20, // 0: control.HealthCheckRequest.body:type_name -> control.HealthCheckRequest.Body + 40, // 1: control.HealthCheckRequest.signature:type_name -> control.Signature + 21, // 2: control.HealthCheckResponse.body:type_name -> control.HealthCheckResponse.Body + 40, // 3: control.HealthCheckResponse.signature:type_name -> control.Signature + 22, // 4: control.NetmapSnapshotRequest.body:type_name -> control.NetmapSnapshotRequest.Body + 40, // 5: control.NetmapSnapshotRequest.signature:type_name -> control.Signature + 23, // 6: control.NetmapSnapshotResponse.body:type_name -> control.NetmapSnapshotResponse.Body + 40, // 7: control.NetmapSnapshotResponse.signature:type_name -> control.Signature + 24, // 8: control.SetNetmapStatusRequest.body:type_name -> control.SetNetmapStatusRequest.Body + 40, // 9: control.SetNetmapStatusRequest.signature:type_name -> control.Signature + 25, // 10: control.SetNetmapStatusResponse.body:type_name -> control.SetNetmapStatusResponse.Body + 40, // 11: control.SetNetmapStatusResponse.signature:type_name -> control.Signature + 26, // 12: control.DropObjectsRequest.body:type_name -> control.DropObjectsRequest.Body + 40, // 13: control.DropObjectsRequest.signature:type_name -> control.Signature + 27, // 14: control.DropObjectsResponse.body:type_name -> control.DropObjectsResponse.Body + 40, // 15: control.DropObjectsResponse.signature:type_name -> control.Signature + 28, // 16: control.ListShardsRequest.body:type_name -> control.ListShardsRequest.Body + 40, // 17: control.ListShardsRequest.signature:type_name -> control.Signature + 29, // 18: control.ListShardsResponse.body:type_name -> control.ListShardsResponse.Body + 40, // 19: control.ListShardsResponse.signature:type_name -> control.Signature + 30, // 20: control.SetShardModeRequest.body:type_name -> control.SetShardModeRequest.Body + 40, // 21: control.SetShardModeRequest.signature:type_name -> control.Signature + 31, // 22: control.SetShardModeResponse.body:type_name -> control.SetShardModeResponse.Body + 40, // 23: control.SetShardModeResponse.signature:type_name -> control.Signature + 32, // 24: control.DumpShardRequest.body:type_name -> control.DumpShardRequest.Body + 40, // 25: control.DumpShardRequest.signature:type_name -> control.Signature + 33, // 26: control.DumpShardResponse.body:type_name -> control.DumpShardResponse.Body + 40, // 27: control.DumpShardResponse.signature:type_name -> control.Signature + 34, // 28: control.RestoreShardRequest.body:type_name -> control.RestoreShardRequest.Body + 40, // 29: control.RestoreShardRequest.signature:type_name -> control.Signature + 35, // 30: control.RestoreShardResponse.body:type_name -> control.RestoreShardResponse.Body + 40, // 31: control.RestoreShardResponse.signature:type_name -> control.Signature + 36, // 32: control.SynchronizeTreeRequest.body:type_name -> control.SynchronizeTreeRequest.Body + 40, // 33: control.SynchronizeTreeRequest.signature:type_name -> control.Signature + 37, // 34: control.SynchronizeTreeResponse.body:type_name -> control.SynchronizeTreeResponse.Body + 40, // 35: control.SynchronizeTreeResponse.signature:type_name -> control.Signature + 38, // 36: control.EvacuateShardRequest.body:type_name -> control.EvacuateShardRequest.Body + 40, // 37: control.EvacuateShardRequest.signature:type_name -> control.Signature + 39, // 38: control.EvacuateShardResponse.body:type_name -> control.EvacuateShardResponse.Body + 40, // 39: control.EvacuateShardResponse.signature:type_name -> control.Signature + 41, // 40: control.HealthCheckResponse.Body.netmap_status:type_name -> control.NetmapStatus + 42, // 41: control.HealthCheckResponse.Body.health_status:type_name -> control.HealthStatus + 43, // 42: control.NetmapSnapshotResponse.Body.netmap:type_name -> control.Netmap + 41, // 43: control.SetNetmapStatusRequest.Body.status:type_name -> control.NetmapStatus + 44, // 44: control.ListShardsResponse.Body.shards:type_name -> control.ShardInfo + 45, // 45: control.SetShardModeRequest.Body.mode:type_name -> control.ShardMode + 0, // 46: control.ControlService.HealthCheck:input_type -> control.HealthCheckRequest + 2, // 47: control.ControlService.NetmapSnapshot:input_type -> control.NetmapSnapshotRequest + 4, // 48: control.ControlService.SetNetmapStatus:input_type -> control.SetNetmapStatusRequest + 6, // 49: control.ControlService.DropObjects:input_type -> control.DropObjectsRequest + 8, // 50: control.ControlService.ListShards:input_type -> control.ListShardsRequest + 10, // 51: control.ControlService.SetShardMode:input_type -> control.SetShardModeRequest + 12, // 52: control.ControlService.DumpShard:input_type -> control.DumpShardRequest + 14, // 53: control.ControlService.RestoreShard:input_type -> control.RestoreShardRequest + 16, // 54: control.ControlService.SynchronizeTree:input_type -> control.SynchronizeTreeRequest + 18, // 55: control.ControlService.EvacuateShard:input_type -> control.EvacuateShardRequest + 1, // 56: control.ControlService.HealthCheck:output_type -> control.HealthCheckResponse + 3, // 57: control.ControlService.NetmapSnapshot:output_type -> control.NetmapSnapshotResponse + 5, // 58: control.ControlService.SetNetmapStatus:output_type -> control.SetNetmapStatusResponse + 7, // 59: control.ControlService.DropObjects:output_type -> control.DropObjectsResponse + 9, // 60: control.ControlService.ListShards:output_type -> control.ListShardsResponse + 11, // 61: control.ControlService.SetShardMode:output_type -> control.SetShardModeResponse + 13, // 62: control.ControlService.DumpShard:output_type -> control.DumpShardResponse + 15, // 63: control.ControlService.RestoreShard:output_type -> control.RestoreShardResponse + 17, // 64: control.ControlService.SynchronizeTree:output_type -> control.SynchronizeTreeResponse + 19, // 65: control.ControlService.EvacuateShard:output_type -> control.EvacuateShardResponse + 56, // [56:66] is the sub-list for method output_type + 46, // [46:56] is the sub-list for method input_type + 46, // [46:46] is the sub-list for extension type_name + 46, // [46:46] is the sub-list for extension extendee + 0, // [0:46] is the sub-list for field type_name } func init() { file_pkg_services_control_service_proto_init() } @@ -2542,7 +2797,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckRequest_Body); i { + switch v := v.(*EvacuateShardRequest); i { case 0: return &v.state case 1: @@ -2554,7 +2809,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckResponse_Body); i { + switch v := v.(*EvacuateShardResponse); i { case 0: return &v.state case 1: @@ -2566,7 +2821,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetmapSnapshotRequest_Body); i { + switch v := v.(*HealthCheckRequest_Body); i { case 0: return &v.state case 1: @@ -2578,7 +2833,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetmapSnapshotResponse_Body); i { + switch v := v.(*HealthCheckResponse_Body); i { case 0: return &v.state case 1: @@ -2590,7 +2845,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetNetmapStatusRequest_Body); i { + switch v := v.(*NetmapSnapshotRequest_Body); i { case 0: return &v.state case 1: @@ -2602,7 +2857,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetNetmapStatusResponse_Body); i { + switch v := v.(*NetmapSnapshotResponse_Body); i { case 0: return &v.state case 1: @@ -2614,7 +2869,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropObjectsRequest_Body); i { + switch v := v.(*SetNetmapStatusRequest_Body); i { case 0: return &v.state case 1: @@ -2626,7 +2881,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropObjectsResponse_Body); i { + switch v := v.(*SetNetmapStatusResponse_Body); i { case 0: return &v.state case 1: @@ -2638,7 +2893,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListShardsRequest_Body); i { + switch v := v.(*DropObjectsRequest_Body); i { case 0: return &v.state case 1: @@ -2650,7 +2905,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListShardsResponse_Body); i { + switch v := v.(*DropObjectsResponse_Body); i { case 0: return &v.state case 1: @@ -2662,7 +2917,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetShardModeRequest_Body); i { + switch v := v.(*ListShardsRequest_Body); i { case 0: return &v.state case 1: @@ -2674,7 +2929,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetShardModeResponse_Body); i { + switch v := v.(*ListShardsResponse_Body); i { case 0: return &v.state case 1: @@ -2686,7 +2941,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DumpShardRequest_Body); i { + switch v := v.(*SetShardModeRequest_Body); i { case 0: return &v.state case 1: @@ -2698,7 +2953,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DumpShardResponse_Body); i { + switch v := v.(*SetShardModeResponse_Body); i { case 0: return &v.state case 1: @@ -2710,7 +2965,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RestoreShardRequest_Body); i { + switch v := v.(*DumpShardRequest_Body); i { case 0: return &v.state case 1: @@ -2722,7 +2977,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RestoreShardResponse_Body); i { + switch v := v.(*DumpShardResponse_Body); i { case 0: return &v.state case 1: @@ -2734,7 +2989,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SynchronizeTreeRequest_Body); i { + switch v := v.(*RestoreShardRequest_Body); i { case 0: return &v.state case 1: @@ -2746,6 +3001,30 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestoreShardResponse_Body); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_services_control_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SynchronizeTreeRequest_Body); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_services_control_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SynchronizeTreeResponse_Body); i { case 0: return &v.state @@ -2757,6 +3036,30 @@ func file_pkg_services_control_service_proto_init() { return nil } } + file_pkg_services_control_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvacuateShardRequest_Body); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_services_control_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvacuateShardResponse_Body); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2764,7 +3067,7 @@ func file_pkg_services_control_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_services_control_service_proto_rawDesc, NumEnums: 0, - NumMessages: 36, + NumMessages: 40, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/services/control/service.proto b/pkg/services/control/service.proto index 5f90399d86..1d377c9755 100644 --- a/pkg/services/control/service.proto +++ b/pkg/services/control/service.proto @@ -34,6 +34,9 @@ service ControlService { // Synchronizes all log operations for the specified tree. rpc SynchronizeTree (SynchronizeTreeRequest) returns (SynchronizeTreeResponse); + + // EvacuateShard moves all data from one shard to the others. + rpc EvacuateShard (EvacuateShardRequest) returns (EvacuateShardResponse); } // Health check request. @@ -312,3 +315,30 @@ message SynchronizeTreeResponse { // Body signature. Signature signature = 2; } + + +// EvacuateShard request. +message EvacuateShardRequest { + // Request body structure. + message Body { + // ID of the shard. + bytes shard_ID = 1; + + // Flag indicating whether object read errors should be ignored. + bool ignore_errors = 2; + } + + Body body = 1; + Signature signature = 2; +} + +// EvacuateShard response. +message EvacuateShardResponse { + // Response body structure. + message Body { + uint32 count = 1; + } + + Body body = 1; + Signature signature = 2; +} diff --git a/pkg/services/control/service_grpc.pb.go b/pkg/services/control/service_grpc.pb.go index 8140c53d9e..eeb96a662d 100644 --- a/pkg/services/control/service_grpc.pb.go +++ b/pkg/services/control/service_grpc.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.2 +// - protoc v3.21.5 // source: pkg/services/control/service.proto package control import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -41,6 +40,8 @@ type ControlServiceClient interface { RestoreShard(ctx context.Context, in *RestoreShardRequest, opts ...grpc.CallOption) (*RestoreShardResponse, error) // Synchronizes all log operations for the specified tree. SynchronizeTree(ctx context.Context, in *SynchronizeTreeRequest, opts ...grpc.CallOption) (*SynchronizeTreeResponse, error) + // EvacuateShard moves all data from one shard to the others. + EvacuateShard(ctx context.Context, in *EvacuateShardRequest, opts ...grpc.CallOption) (*EvacuateShardResponse, error) } type controlServiceClient struct { @@ -132,6 +133,15 @@ func (c *controlServiceClient) SynchronizeTree(ctx context.Context, in *Synchron return out, nil } +func (c *controlServiceClient) EvacuateShard(ctx context.Context, in *EvacuateShardRequest, opts ...grpc.CallOption) (*EvacuateShardResponse, error) { + out := new(EvacuateShardResponse) + err := c.cc.Invoke(ctx, "/control.ControlService/EvacuateShard", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ControlServiceServer is the server API for ControlService service. // All implementations should embed UnimplementedControlServiceServer // for forward compatibility @@ -154,6 +164,8 @@ type ControlServiceServer interface { RestoreShard(context.Context, *RestoreShardRequest) (*RestoreShardResponse, error) // Synchronizes all log operations for the specified tree. SynchronizeTree(context.Context, *SynchronizeTreeRequest) (*SynchronizeTreeResponse, error) + // EvacuateShard moves all data from one shard to the others. + EvacuateShard(context.Context, *EvacuateShardRequest) (*EvacuateShardResponse, error) } // UnimplementedControlServiceServer should be embedded to have forward compatible implementations. @@ -187,6 +199,9 @@ func (UnimplementedControlServiceServer) RestoreShard(context.Context, *RestoreS func (UnimplementedControlServiceServer) SynchronizeTree(context.Context, *SynchronizeTreeRequest) (*SynchronizeTreeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SynchronizeTree not implemented") } +func (UnimplementedControlServiceServer) EvacuateShard(context.Context, *EvacuateShardRequest) (*EvacuateShardResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EvacuateShard not implemented") +} // UnsafeControlServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ControlServiceServer will @@ -361,6 +376,24 @@ func _ControlService_SynchronizeTree_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _ControlService_EvacuateShard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EvacuateShardRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServiceServer).EvacuateShard(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/control.ControlService/EvacuateShard", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServiceServer).EvacuateShard(ctx, req.(*EvacuateShardRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ControlService_ServiceDesc is the grpc.ServiceDesc for ControlService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -404,6 +437,10 @@ var ControlService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SynchronizeTree", Handler: _ControlService_SynchronizeTree_Handler, }, + { + MethodName: "EvacuateShard", + Handler: _ControlService_EvacuateShard_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/services/control/service.proto", diff --git a/pkg/services/control/service_neofs.pb.go b/pkg/services/control/service_neofs.pb.go index 98987a8636..e5aa50fea5 100644 --- a/pkg/services/control/service_neofs.pb.go +++ b/pkg/services/control/service_neofs.pb.go @@ -1384,3 +1384,165 @@ func (x *SynchronizeTreeResponse) ReadSignedData(buf []byte) ([]byte, error) { func (x *SynchronizeTreeResponse) SetSignature(sig *Signature) { x.Signature = sig } + +// StableSize returns the size of x in protobuf format. +// +// Structures with the same field values have the same binary size. +func (x *EvacuateShardRequest_Body) StableSize() (size int) { + size += proto.BytesSize(1, x.Shard_ID) + size += proto.BoolSize(2, x.IgnoreErrors) + return size +} + +// StableMarshal marshals x in protobuf binary format with stable field order. +// +// If buffer length is less than x.StableSize(), new buffer is allocated. +// +// Returns any error encountered which did not allow writing the data completely. +// Otherwise, returns the buffer in which the data is written. +// +// Structures with the same field values have the same binary format. +func (x *EvacuateShardRequest_Body) StableMarshal(buf []byte) []byte { + if x == nil { + return []byte{} + } + if buf == nil { + buf = make([]byte, x.StableSize()) + } + var offset int + offset += proto.BytesMarshal(1, buf[offset:], x.Shard_ID) + offset += proto.BoolMarshal(2, buf[offset:], x.IgnoreErrors) + return buf +} + +// StableSize returns the size of x in protobuf format. +// +// Structures with the same field values have the same binary size. +func (x *EvacuateShardRequest) StableSize() (size int) { + size += proto.NestedStructureSize(1, x.Body) + size += proto.NestedStructureSize(2, x.Signature) + return size +} + +// StableMarshal marshals x in protobuf binary format with stable field order. +// +// If buffer length is less than x.StableSize(), new buffer is allocated. +// +// Returns any error encountered which did not allow writing the data completely. +// Otherwise, returns the buffer in which the data is written. +// +// Structures with the same field values have the same binary format. +func (x *EvacuateShardRequest) StableMarshal(buf []byte) []byte { + if x == nil { + return []byte{} + } + if buf == nil { + buf = make([]byte, x.StableSize()) + } + var offset int + offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) + offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) + return buf +} + +// ReadSignedData fills buf with signed data of x. +// If buffer length is less than x.SignedDataSize(), new buffer is allocated. +// +// Returns any error encountered which did not allow writing the data completely. +// Otherwise, returns the buffer in which the data is written. +// +// Structures with the same field values have the same signed data. +func (x *EvacuateShardRequest) SignedDataSize() int { + return x.GetBody().StableSize() +} + +// SignedDataSize returns size of the request signed data in bytes. +// +// Structures with the same field values have the same signed data size. +func (x *EvacuateShardRequest) ReadSignedData(buf []byte) ([]byte, error) { + return x.GetBody().StableMarshal(buf), nil +} + +func (x *EvacuateShardRequest) SetSignature(sig *Signature) { + x.Signature = sig +} + +// StableSize returns the size of x in protobuf format. +// +// Structures with the same field values have the same binary size. +func (x *EvacuateShardResponse_Body) StableSize() (size int) { + size += proto.UInt32Size(1, x.Count) + return size +} + +// StableMarshal marshals x in protobuf binary format with stable field order. +// +// If buffer length is less than x.StableSize(), new buffer is allocated. +// +// Returns any error encountered which did not allow writing the data completely. +// Otherwise, returns the buffer in which the data is written. +// +// Structures with the same field values have the same binary format. +func (x *EvacuateShardResponse_Body) StableMarshal(buf []byte) []byte { + if x == nil { + return []byte{} + } + if buf == nil { + buf = make([]byte, x.StableSize()) + } + var offset int + offset += proto.UInt32Marshal(1, buf[offset:], x.Count) + return buf +} + +// StableSize returns the size of x in protobuf format. +// +// Structures with the same field values have the same binary size. +func (x *EvacuateShardResponse) StableSize() (size int) { + size += proto.NestedStructureSize(1, x.Body) + size += proto.NestedStructureSize(2, x.Signature) + return size +} + +// StableMarshal marshals x in protobuf binary format with stable field order. +// +// If buffer length is less than x.StableSize(), new buffer is allocated. +// +// Returns any error encountered which did not allow writing the data completely. +// Otherwise, returns the buffer in which the data is written. +// +// Structures with the same field values have the same binary format. +func (x *EvacuateShardResponse) StableMarshal(buf []byte) []byte { + if x == nil { + return []byte{} + } + if buf == nil { + buf = make([]byte, x.StableSize()) + } + var offset int + offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) + offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) + return buf +} + +// ReadSignedData fills buf with signed data of x. +// If buffer length is less than x.SignedDataSize(), new buffer is allocated. +// +// Returns any error encountered which did not allow writing the data completely. +// Otherwise, returns the buffer in which the data is written. +// +// Structures with the same field values have the same signed data. +func (x *EvacuateShardResponse) SignedDataSize() int { + return x.GetBody().StableSize() +} + +// SignedDataSize returns size of the request signed data in bytes. +// +// Structures with the same field values have the same signed data size. +func (x *EvacuateShardResponse) ReadSignedData(buf []byte) ([]byte, error) { + return x.GetBody().StableMarshal(buf), nil +} + +func (x *EvacuateShardResponse) SetSignature(sig *Signature) { + x.Signature = sig +} diff --git a/pkg/services/control/types.pb.go b/pkg/services/control/types.pb.go index 28975091c7..b1962abce6 100644 --- a/pkg/services/control/types.pb.go +++ b/pkg/services/control/types.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.2 +// protoc v3.21.5 // source: pkg/services/control/types.proto package control import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const (