From d743d429898abdb40f39b5b9eb615c448f90b5d9 Mon Sep 17 00:00:00 2001 From: Andrey Butusov Date: Tue, 15 Oct 2024 00:25:42 +0300 Subject: [PATCH 1/3] *: fix incorrect comment var name Signed-off-by: Andrey Butusov --- pkg/local_object_storage/metabase/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/local_object_storage/metabase/util.go b/pkg/local_object_storage/metabase/util.go index cd5e67c497..49cf7f6203 100644 --- a/pkg/local_object_storage/metabase/util.go +++ b/pkg/local_object_storage/metabase/util.go @@ -20,7 +20,7 @@ var ( // garbageObjectsBucketName stores rows with the objects that should be physically // deleted by the node (Garbage Collector routine). garbageObjectsBucketName = []byte{garbageObjectsPrefix} - // garbageObjectsBucketName stores rows with the containers that should be physically + // garbageContainersBucketName stores rows with the containers that should be physically // deleted by the node (Garbage Collector routine). garbageContainersBucketName = []byte{garbageContainersPrefix} toMoveItBucketName = []byte{toMoveItPrefix} From 5567e5fef477bbf9085124a6fb5e44a32fa42e35 Mon Sep 17 00:00:00 2001 From: Andrey Butusov Date: Wed, 16 Oct 2024 12:48:53 +0300 Subject: [PATCH 2/3] node/control: add `object revive` control command Includes API definition extending, RPC implementation, tests of metabase func. The command requests server's storage engine to revive object by address. It's purge all removal marks from all metabases and returns revival statuses. Signed-off-by: Andrey Butusov --- pkg/local_object_storage/engine/revive.go | 41 + pkg/local_object_storage/metabase/revive.go | 147 +++ .../metabase/revive_test.go | 130 +++ pkg/local_object_storage/shard/revive.go | 21 + pkg/services/control/convert.go | 18 + pkg/services/control/rpc.go | 22 + pkg/services/control/server/object_revive.go | 52 + pkg/services/control/service.pb.go | 892 +++++++++++++----- pkg/services/control/service.proto | 41 + pkg/services/control/service_grpc.pb.go | 143 ++- pkg/services/control/service_neofs.pb.go | 194 ++++ 11 files changed, 1393 insertions(+), 308 deletions(-) create mode 100644 pkg/local_object_storage/engine/revive.go create mode 100644 pkg/local_object_storage/metabase/revive.go create mode 100644 pkg/local_object_storage/metabase/revive_test.go create mode 100644 pkg/local_object_storage/shard/revive.go create mode 100644 pkg/services/control/server/object_revive.go diff --git a/pkg/local_object_storage/engine/revive.go b/pkg/local_object_storage/engine/revive.go new file mode 100644 index 0000000000..c1e41917bf --- /dev/null +++ b/pkg/local_object_storage/engine/revive.go @@ -0,0 +1,41 @@ +package engine + +import ( + meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + "go.uber.org/zap" +) + +// ReviveShardStatus contains the Status of the object's revival in the Shard and Shard ID. +type ReviveShardStatus struct { + ID string + Status meta.ReviveStatus +} + +// ReviveStatus represents the status of the object's revival in the StorageEngine. +type ReviveStatus struct { + Shards []ReviveShardStatus +} + +// ReviveObject forcefully revives object by oid.Address in the StorageEngine. +// Iterate over all shards despite errors and purge all removal marks from all metabases. +func (e *StorageEngine) ReviveObject(address oid.Address) (res ReviveStatus, err error) { + e.iterateOverUnsortedShards(func(sh hashedShard) (stop bool) { + reviveStatus, err := sh.ReviveObject(address) + id := *sh.ID() + res.Shards = append(res.Shards, ReviveShardStatus{ + ID: id.String(), + Status: reviveStatus, + }) + if err != nil { + e.log.Warn("failed to revive object in shard", + zap.String("shard", id.String()), + zap.String("address", address.EncodeToString()), + zap.Error(err), + ) + } + + return false + }) + return +} diff --git a/pkg/local_object_storage/metabase/revive.go b/pkg/local_object_storage/metabase/revive.go new file mode 100644 index 0000000000..e637956288 --- /dev/null +++ b/pkg/local_object_storage/metabase/revive.go @@ -0,0 +1,147 @@ +package meta + +import ( + "fmt" + + "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util/logicerr" + "github.com/nspcc-dev/neofs-sdk-go/object" + oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + "go.etcd.io/bbolt" +) + +// ErrObjectWasNotRemoved is returned when object neither in the graveyard nor was marked with GC mark. +var ErrObjectWasNotRemoved = logicerr.New("object neither in the graveyard nor was marked with GC mark") + +// ErrReviveFromContainerGarbage is returned when the object is in the container that marked with GC mark. +var ErrReviveFromContainerGarbage = logicerr.New("revive from container marked with GC mark") + +type reviveStatusType int + +const ( + // ReviveStatusGraveyard is the type of revival status of an object from a graveyard. + ReviveStatusGraveyard reviveStatusType = iota + // ReviveStatusGarbage is the type of revival status of an object from the garbage bucket. + ReviveStatusGarbage + // ReviveStatusError is the type of status when an error occurs during revive. + ReviveStatusError +) + +// ReviveStatus groups the resulting values of ReviveObject operation. +// Contains the type of revival status and message for details. +type ReviveStatus struct { + statusType reviveStatusType + message string +} + +// Message returns message of status. +func (s *ReviveStatus) Message() string { + return s.message +} + +// StatusType returns the type of revival status. +func (s *ReviveStatus) StatusType() reviveStatusType { + return s.statusType +} + +func (s *ReviveStatus) setStatusGraveyard(tomb string) { + s.statusType = ReviveStatusGraveyard + s.message = fmt.Sprintf("successful revival from graveyard, tomb: %s", tomb) +} + +func (s *ReviveStatus) setStatusGarbage() { + s.statusType = ReviveStatusGarbage + s.message = "successful revival from garbage bucket" +} + +func (s *ReviveStatus) setStatusError(err error) { + s.statusType = ReviveStatusError + s.message = fmt.Sprintf("didn't revive, err: %v", err) +} + +// ReviveObject revives object by oid.Address. Removes GCMark/Tombstone records in the corresponding buckets +// and restore metrics. +func (db *DB) ReviveObject(addr oid.Address) (res ReviveStatus, err error) { + db.modeMtx.RLock() + defer db.modeMtx.RUnlock() + + if db.mode.ReadOnly() { + res.setStatusError(ErrReadOnlyMode) + return res, ErrReadOnlyMode + } else if db.mode.NoMetabase() { + res.setStatusError(ErrDegradedMode) + return res, ErrDegradedMode + } + + currEpoch := db.epochState.CurrentEpoch() + + err = db.boltDB.Update(func(tx *bbolt.Tx) error { + garbageObjectsBKT := tx.Bucket(garbageObjectsBucketName) + garbageContainersBKT := tx.Bucket(garbageContainersBucketName) + graveyardBKT := tx.Bucket(graveyardBucketName) + + buf := make([]byte, addressKeySize) + + targetKey := addressKey(addr, buf) + + if graveyardBKT == nil || garbageObjectsBKT == nil { + // incorrect metabase state, does not make + // sense to check garbage bucket + return ErrObjectWasNotRemoved + } + + val := graveyardBKT.Get(targetKey) + if val != nil { + // object in the graveyard + if err := graveyardBKT.Delete(targetKey); err != nil { + return err + } + + var tombAddress oid.Address + if err := decodeAddressFromKey(&tombAddress, val[:addressKeySize]); err != nil { + return err + } + res.setStatusGraveyard(tombAddress.EncodeToString()) + } else { + val = garbageContainersBKT.Get(targetKey[:cidSize]) + if val != nil { + return ErrReviveFromContainerGarbage + } + + val = garbageObjectsBKT.Get(targetKey) + if val != nil { + // object marked with GC mark + res.setStatusGarbage() + } else { + // neither in the graveyard + // nor was marked with GC mark + return ErrObjectWasNotRemoved + } + } + + if err := garbageObjectsBKT.Delete(targetKey); err != nil { + return err + } + + if obj, err := db.get(tx, addr, buf, false, true, currEpoch); err == nil { + // if object is stored, and it is regular object then update bucket + // with container size estimations + if obj.Type() == object.TypeRegular { + if err := changeContainerSize(tx, addr.Container(), obj.PayloadSize(), true); err != nil { + return err + } + } + + // also need to restore logical counter + if err := db.updateCounter(tx, logical, 1, true); err != nil { + return err + } + } + + return nil + }) + if err != nil { + res.setStatusError(err) + } + + return +} diff --git a/pkg/local_object_storage/metabase/revive_test.go b/pkg/local_object_storage/metabase/revive_test.go new file mode 100644 index 0000000000..49f99310a3 --- /dev/null +++ b/pkg/local_object_storage/metabase/revive_test.go @@ -0,0 +1,130 @@ +package meta_test + +import ( + "testing" + + "github.com/nspcc-dev/neofs-node/pkg/core/object" + meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" + oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test" + "github.com/stretchr/testify/require" +) + +func TestDB_ReviveObject(t *testing.T) { + db := newDB(t) + + t.Run("from graveyard", func(t *testing.T) { + raw := generateObject(t) + addAttribute(raw, "foo", "bar") + + tombstoneID := oidtest.Address() + + err := putBig(db, raw) + require.NoError(t, err) + + exists, err := metaExists(db, object.AddressOf(raw)) + require.NoError(t, err) + require.True(t, exists) + + // inhume object with tombstone + err = metaInhume(db, object.AddressOf(raw), tombstoneID) + require.NoError(t, err) + + _, err = metaExists(db, object.AddressOf(raw)) + require.ErrorAs(t, err, new(apistatus.ObjectAlreadyRemoved)) + + _, err = metaGet(db, object.AddressOf(raw), false) + require.ErrorAs(t, err, new(apistatus.ObjectAlreadyRemoved)) + + // revive object + res, err := db.ReviveObject(object.AddressOf(raw)) + require.NoError(t, err) + require.Equal(t, meta.ReviveStatusGraveyard, res.StatusType()) + + exists, err = metaExists(db, object.AddressOf(raw)) + require.NoError(t, err) + require.True(t, exists) + }) + + t.Run("from GC", func(t *testing.T) { + raw := generateObject(t) + addAttribute(raw, "foo", "bar") + + err := putBig(db, raw) + require.NoError(t, err) + + exists, err := metaExists(db, object.AddressOf(raw)) + require.NoError(t, err) + require.True(t, exists) + + // inhume with GC mark + var gcPrm meta.InhumePrm + gcPrm.SetGCMark() + gcPrm.SetAddresses(object.AddressOf(raw)) + + _, err = db.Inhume(gcPrm) + require.NoError(t, err) + + _, err = metaExists(db, object.AddressOf(raw)) + require.ErrorAs(t, err, new(apistatus.ObjectNotFound)) + + _, err = metaGet(db, object.AddressOf(raw), false) + require.ErrorAs(t, err, new(apistatus.ObjectNotFound)) + + // revive object + res, err := db.ReviveObject(object.AddressOf(raw)) + require.NoError(t, err) + require.Equal(t, meta.ReviveStatusGarbage, res.StatusType()) + + exists, err = metaExists(db, object.AddressOf(raw)) + require.NoError(t, err) + require.True(t, exists) + + obj, err := metaGet(db, object.AddressOf(raw), false) + require.NoError(t, err) + require.NotNil(t, obj) + }) + + t.Run("revive locked", func(t *testing.T) { + locked := oidtest.Address() + + err := db.Lock(locked.Container(), oidtest.ID(), []oid.ID{locked.Object()}) + require.NoError(t, err) + + var prm meta.InhumePrm + prm.SetAddresses(locked) + + _, err = db.Inhume(prm) + + require.ErrorIs(t, err, new(apistatus.ObjectLocked)) + + res, err := db.ReviveObject(locked) + require.ErrorIs(t, err, meta.ErrObjectWasNotRemoved) + require.Equal(t, meta.ReviveStatusError, res.StatusType()) + }) + + t.Run("revive object that not stored in db", func(t *testing.T) { + addr := oidtest.Address() + + res, err := db.ReviveObject(addr) + require.ErrorIs(t, err, meta.ErrObjectWasNotRemoved) + require.Equal(t, meta.ReviveStatusError, res.StatusType()) + }) + + t.Run("revive object that not removed", func(t *testing.T) { + raw := generateObject(t) + addAttribute(raw, "foo", "bar") + + err := putBig(db, raw) + require.NoError(t, err) + + exists, err := metaExists(db, object.AddressOf(raw)) + require.NoError(t, err) + require.True(t, exists) + + res, err := db.ReviveObject(object.AddressOf(raw)) + require.ErrorIs(t, err, meta.ErrObjectWasNotRemoved) + require.Equal(t, meta.ReviveStatusError, res.StatusType()) + }) +} diff --git a/pkg/local_object_storage/shard/revive.go b/pkg/local_object_storage/shard/revive.go new file mode 100644 index 0000000000..80244f60c6 --- /dev/null +++ b/pkg/local_object_storage/shard/revive.go @@ -0,0 +1,21 @@ +package shard + +import ( + meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + oid "github.com/nspcc-dev/neofs-sdk-go/object/id" +) + +// ReviveObject try to revive object in Shard, by remove records from graveyard and garbage. +// +// Returns meta.ReviveStatus of object and error. +func (s *Shard) ReviveObject(addr oid.Address) (meta.ReviveStatus, error) { + s.m.RLock() + defer s.m.RUnlock() + + if s.GetMode().ReadOnly() { + return meta.ReviveStatus{}, ErrReadOnlyMode + } else if s.GetMode().NoMetabase() { + return meta.ReviveStatus{}, ErrDegradedMode + } + return s.metaBase.ReviveObject(addr) +} diff --git a/pkg/services/control/convert.go b/pkg/services/control/convert.go index 49a522f56f..a8de90124e 100644 --- a/pkg/services/control/convert.go +++ b/pkg/services/control/convert.go @@ -237,3 +237,21 @@ func (w *objectStatusResponseWrapper) FromGRPCMessage(m grpc.Message) error { w.ObjectStatusResponse = r return nil } + +type reviveObjectResponseWrapper struct { + *ReviveObjectResponse +} + +func (w *reviveObjectResponseWrapper) ToGRPCMessage() grpc.Message { + return w.ReviveObjectResponse +} + +func (w *reviveObjectResponseWrapper) FromGRPCMessage(m grpc.Message) error { + r, ok := m.(*ReviveObjectResponse) + if !ok { + return message.NewUnexpectedMessageType(m, (*ReviveObjectResponse)(nil)) + } + + w.ReviveObjectResponse = r + return nil +} diff --git a/pkg/services/control/rpc.go b/pkg/services/control/rpc.go index 088122de9f..9a94f43efe 100644 --- a/pkg/services/control/rpc.go +++ b/pkg/services/control/rpc.go @@ -23,6 +23,7 @@ const ( rpcEvacuateShard = "EvacuateShard" rpcFlushCache = "FlushCache" rpcObjectStatus = "ObjectStatus" + rpcReviveObject = "ReviveObject" ) // HealthCheck executes ControlService.HealthCheck RPC. @@ -246,3 +247,24 @@ func ObjectStatus(cli *client.Client, req *ObjectStatusRequest, opts ...client.C return wResp.ObjectStatusResponse, nil } + +// ReviveObject executes ControlService.ReviveObject RPC. +func ReviveObject( + cli *client.Client, + req *ReviveObjectRequest, + opts ...client.CallOption, +) (*ReviveObjectResponse, error) { + wResp := &reviveObjectResponseWrapper{ + new(ReviveObjectResponse), + } + + wReq := &requestWrapper{ + m: req, + } + err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcReviveObject), wReq, wResp, opts...) + if err != nil { + return nil, err + } + + return wResp.ReviveObjectResponse, nil +} diff --git a/pkg/services/control/server/object_revive.go b/pkg/services/control/server/object_revive.go new file mode 100644 index 0000000000..1a8f0454ec --- /dev/null +++ b/pkg/services/control/server/object_revive.go @@ -0,0 +1,52 @@ +package control + +import ( + "context" + + "github.com/nspcc-dev/neofs-node/pkg/services/control" + oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (s *Server) ReviveObject(_ context.Context, request *control.ReviveObjectRequest) (*control.ReviveObjectResponse, error) { + err := s.isValidRequest(request) + if err != nil { + return nil, status.Error(codes.PermissionDenied, err.Error()) + } + + // check availability + err = s.ready() + if err != nil { + return nil, err + } + + var addr oid.Address + err = addr.DecodeString(string(request.GetBody().GetObjectAddress())) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "parsing object address: %s", err) + } + + res, err := s.storage.ReviveObject(addr) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + resp := &control.ReviveObjectResponse{ + Body: &control.ReviveObjectResponse_Body{}, + } + for _, sh := range res.Shards { + respSh := new(control.ReviveObjectResponse_Body_Shard) + respSh.ShardId = sh.ID + respSh.Status = sh.Status.Message() + + resp.Body.Shards = append(resp.Body.Shards, respSh) + } + + 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 f31a9ad4c9..26c8fee573 100644 --- a/pkg/services/control/service.pb.go +++ b/pkg/services/control/service.pb.go @@ -1404,6 +1404,122 @@ func (x *ObjectStatusResponse) GetSignature() *Signature { return nil } +// ReviveObject request. +type ReviveObjectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Body of revive object request message. + Body *ReviveObjectRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Body signature. + Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *ReviveObjectRequest) Reset() { + *x = ReviveObjectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_services_control_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReviveObjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReviveObjectRequest) ProtoMessage() {} + +func (x *ReviveObjectRequest) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReviveObjectRequest.ProtoReflect.Descriptor instead. +func (*ReviveObjectRequest) Descriptor() ([]byte, []int) { + return file_pkg_services_control_service_proto_rawDescGZIP(), []int{24} +} + +func (x *ReviveObjectRequest) GetBody() *ReviveObjectRequest_Body { + if x != nil { + return x.Body + } + return nil +} + +func (x *ReviveObjectRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + +// ReviveObject response. +type ReviveObjectResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Body of revive object response message. + Body *ReviveObjectResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Body signature. + Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *ReviveObjectResponse) Reset() { + *x = ReviveObjectResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_services_control_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReviveObjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReviveObjectResponse) ProtoMessage() {} + +func (x *ReviveObjectResponse) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReviveObjectResponse.ProtoReflect.Descriptor instead. +func (*ReviveObjectResponse) Descriptor() ([]byte, []int) { + return file_pkg_services_control_service_proto_rawDescGZIP(), []int{25} +} + +func (x *ReviveObjectResponse) GetBody() *ReviveObjectResponse_Body { + if x != nil { + return x.Body + } + return nil +} + +func (x *ReviveObjectResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + // Health check request body. type HealthCheckRequest_Body struct { state protoimpl.MessageState @@ -1414,7 +1530,7 @@ type HealthCheckRequest_Body struct { func (x *HealthCheckRequest_Body) Reset() { *x = HealthCheckRequest_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) } @@ -1427,7 +1543,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[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 { @@ -1458,7 +1574,7 @@ type HealthCheckResponse_Body struct { func (x *HealthCheckResponse_Body) Reset() { *x = HealthCheckResponse_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) } @@ -1471,7 +1587,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[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 { @@ -1522,7 +1638,7 @@ type SetNetmapStatusRequest_Body struct { func (x *SetNetmapStatusRequest_Body) Reset() { *x = SetNetmapStatusRequest_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) } @@ -1535,7 +1651,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[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 { @@ -1575,7 +1691,7 @@ type SetNetmapStatusResponse_Body struct { func (x *SetNetmapStatusResponse_Body) Reset() { *x = SetNetmapStatusResponse_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) } @@ -1588,7 +1704,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[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 { @@ -1618,7 +1734,7 @@ type DropObjectsRequest_Body struct { func (x *DropObjectsRequest_Body) Reset() { *x = DropObjectsRequest_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) } @@ -1631,7 +1747,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[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 { @@ -1664,7 +1780,7 @@ type DropObjectsResponse_Body struct { func (x *DropObjectsResponse_Body) Reset() { *x = DropObjectsResponse_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) } @@ -1677,7 +1793,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[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 { @@ -1703,7 +1819,7 @@ type ListShardsRequest_Body struct { func (x *ListShardsRequest_Body) Reset() { *x = ListShardsRequest_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) } @@ -1716,7 +1832,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[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 { @@ -1745,7 +1861,7 @@ type ListShardsResponse_Body struct { func (x *ListShardsResponse_Body) Reset() { *x = ListShardsResponse_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) } @@ -1758,7 +1874,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[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 { @@ -1791,7 +1907,7 @@ type ListObjectsRequest_Body struct { func (x *ListObjectsRequest_Body) Reset() { *x = ListObjectsRequest_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) } @@ -1804,7 +1920,7 @@ func (x *ListObjectsRequest_Body) String() string { func (*ListObjectsRequest_Body) ProtoMessage() {} func (x *ListObjectsRequest_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 { @@ -1826,14 +1942,14 @@ type ListObjectsResponse_Body struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Address of the object. + // Addresses of the object. ObjectAddress [][]byte `protobuf:"bytes,1,rep,name=object_address,json=objectAddress,proto3" json:"object_address,omitempty"` } func (x *ListObjectsResponse_Body) Reset() { *x = ListObjectsResponse_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) } @@ -1846,7 +1962,7 @@ func (x *ListObjectsResponse_Body) String() string { func (*ListObjectsResponse_Body) ProtoMessage() {} func (x *ListObjectsResponse_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 { @@ -1886,7 +2002,7 @@ type SetShardModeRequest_Body struct { func (x *SetShardModeRequest_Body) Reset() { *x = SetShardModeRequest_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) } @@ -1899,7 +2015,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[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 { @@ -1946,7 +2062,7 @@ type SetShardModeResponse_Body struct { func (x *SetShardModeResponse_Body) Reset() { *x = SetShardModeResponse_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) } @@ -1959,7 +2075,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[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 { @@ -1992,7 +2108,7 @@ type DumpShardRequest_Body struct { func (x *DumpShardRequest_Body) Reset() { *x = DumpShardRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[36] + mi := &file_pkg_services_control_service_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2005,7 +2121,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[36] + 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 { @@ -2052,7 +2168,7 @@ type DumpShardResponse_Body struct { func (x *DumpShardResponse_Body) Reset() { *x = DumpShardResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[37] + mi := &file_pkg_services_control_service_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2065,7 +2181,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[37] + 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 { @@ -2098,7 +2214,7 @@ type RestoreShardRequest_Body struct { func (x *RestoreShardRequest_Body) Reset() { *x = RestoreShardRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[38] + mi := &file_pkg_services_control_service_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2111,7 +2227,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[38] + mi := &file_pkg_services_control_service_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2158,7 +2274,7 @@ type RestoreShardResponse_Body struct { func (x *RestoreShardResponse_Body) Reset() { *x = RestoreShardResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[39] + mi := &file_pkg_services_control_service_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2171,7 +2287,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[39] + mi := &file_pkg_services_control_service_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2202,7 +2318,7 @@ type SynchronizeTreeRequest_Body struct { func (x *SynchronizeTreeRequest_Body) Reset() { *x = SynchronizeTreeRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[40] + mi := &file_pkg_services_control_service_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2215,7 +2331,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[40] + mi := &file_pkg_services_control_service_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2262,7 +2378,7 @@ type SynchronizeTreeResponse_Body struct { func (x *SynchronizeTreeResponse_Body) Reset() { *x = SynchronizeTreeResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[41] + mi := &file_pkg_services_control_service_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2275,7 +2391,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[41] + mi := &file_pkg_services_control_service_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2306,7 +2422,7 @@ type EvacuateShardRequest_Body struct { func (x *EvacuateShardRequest_Body) Reset() { *x = EvacuateShardRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[42] + mi := &file_pkg_services_control_service_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2319,7 +2435,7 @@ func (x *EvacuateShardRequest_Body) String() string { func (*EvacuateShardRequest_Body) ProtoMessage() {} func (x *EvacuateShardRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[42] + mi := &file_pkg_services_control_service_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2361,7 +2477,7 @@ type EvacuateShardResponse_Body struct { func (x *EvacuateShardResponse_Body) Reset() { *x = EvacuateShardResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[43] + mi := &file_pkg_services_control_service_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2374,7 +2490,7 @@ func (x *EvacuateShardResponse_Body) String() string { func (*EvacuateShardResponse_Body) ProtoMessage() {} func (x *EvacuateShardResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[43] + mi := &file_pkg_services_control_service_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2410,7 +2526,7 @@ type FlushCacheRequest_Body struct { func (x *FlushCacheRequest_Body) Reset() { *x = FlushCacheRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[44] + mi := &file_pkg_services_control_service_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2423,7 +2539,7 @@ func (x *FlushCacheRequest_Body) String() string { func (*FlushCacheRequest_Body) ProtoMessage() {} func (x *FlushCacheRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[44] + mi := &file_pkg_services_control_service_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2456,7 +2572,7 @@ type FlushCacheResponse_Body struct { func (x *FlushCacheResponse_Body) Reset() { *x = FlushCacheResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[45] + mi := &file_pkg_services_control_service_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2469,7 +2585,7 @@ func (x *FlushCacheResponse_Body) String() string { func (*FlushCacheResponse_Body) ProtoMessage() {} func (x *FlushCacheResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[45] + mi := &file_pkg_services_control_service_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2498,7 +2614,7 @@ type ObjectStatusRequest_Body struct { func (x *ObjectStatusRequest_Body) Reset() { *x = ObjectStatusRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[46] + mi := &file_pkg_services_control_service_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2511,7 +2627,7 @@ func (x *ObjectStatusRequest_Body) String() string { func (*ObjectStatusRequest_Body) ProtoMessage() {} func (x *ObjectStatusRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[46] + mi := &file_pkg_services_control_service_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2547,7 +2663,7 @@ type ObjectStatusResponse_Body struct { func (x *ObjectStatusResponse_Body) Reset() { *x = ObjectStatusResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[47] + mi := &file_pkg_services_control_service_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2560,7 +2676,7 @@ func (x *ObjectStatusResponse_Body) String() string { func (*ObjectStatusResponse_Body) ProtoMessage() {} func (x *ObjectStatusResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[47] + mi := &file_pkg_services_control_service_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2598,7 +2714,7 @@ type ObjectStatusResponse_Body_Shard struct { func (x *ObjectStatusResponse_Body_Shard) Reset() { *x = ObjectStatusResponse_Body_Shard{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[48] + mi := &file_pkg_services_control_service_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2611,7 +2727,7 @@ func (x *ObjectStatusResponse_Body_Shard) String() string { func (*ObjectStatusResponse_Body_Shard) ProtoMessage() {} func (x *ObjectStatusResponse_Body_Shard) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[48] + mi := &file_pkg_services_control_service_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2656,7 +2772,7 @@ type ObjectStatusResponse_Body_Shard_Status struct { func (x *ObjectStatusResponse_Body_Shard_Status) Reset() { *x = ObjectStatusResponse_Body_Shard_Status{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[49] + mi := &file_pkg_services_control_service_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2669,7 +2785,7 @@ func (x *ObjectStatusResponse_Body_Shard_Status) String() string { func (*ObjectStatusResponse_Body_Shard_Status) ProtoMessage() {} func (x *ObjectStatusResponse_Body_Shard_Status) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[49] + mi := &file_pkg_services_control_service_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2699,6 +2815,162 @@ func (x *ObjectStatusResponse_Body_Shard_Status) GetStatus() string { return "" } +// Request body structure. +type ReviveObjectRequest_Body struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Requested object. + ObjectAddress []byte `protobuf:"bytes,1,opt,name=object_address,json=objectAddress,proto3" json:"object_address,omitempty"` +} + +func (x *ReviveObjectRequest_Body) Reset() { + *x = ReviveObjectRequest_Body{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_services_control_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReviveObjectRequest_Body) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReviveObjectRequest_Body) ProtoMessage() {} + +func (x *ReviveObjectRequest_Body) ProtoReflect() protoreflect.Message { + mi := &file_pkg_services_control_service_proto_msgTypes[52] + 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 ReviveObjectRequest_Body.ProtoReflect.Descriptor instead. +func (*ReviveObjectRequest_Body) Descriptor() ([]byte, []int) { + return file_pkg_services_control_service_proto_rawDescGZIP(), []int{24, 0} +} + +func (x *ReviveObjectRequest_Body) GetObjectAddress() []byte { + if x != nil { + return x.ObjectAddress + } + return nil +} + +// Response body structure. +type ReviveObjectResponse_Body struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Engine's shards in which the object was revived. + Shards []*ReviveObjectResponse_Body_Shard `protobuf:"bytes,1,rep,name=shards,proto3" json:"shards,omitempty"` +} + +func (x *ReviveObjectResponse_Body) Reset() { + *x = ReviveObjectResponse_Body{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_services_control_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReviveObjectResponse_Body) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReviveObjectResponse_Body) ProtoMessage() {} + +func (x *ReviveObjectResponse_Body) ProtoReflect() protoreflect.Message { + mi := &file_pkg_services_control_service_proto_msgTypes[53] + 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 ReviveObjectResponse_Body.ProtoReflect.Descriptor instead. +func (*ReviveObjectResponse_Body) Descriptor() ([]byte, []int) { + return file_pkg_services_control_service_proto_rawDescGZIP(), []int{25, 0} +} + +func (x *ReviveObjectResponse_Body) GetShards() []*ReviveObjectResponse_Body_Shard { + if x != nil { + return x.Shards + } + return nil +} + +// Information about of object's revival status from a single shard. +type ReviveObjectResponse_Body_Shard struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // String presentation of shard ID. + ShardId string `protobuf:"bytes,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` + // Object's revival status in a free form (human readable). + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ReviveObjectResponse_Body_Shard) Reset() { + *x = ReviveObjectResponse_Body_Shard{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_services_control_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReviveObjectResponse_Body_Shard) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReviveObjectResponse_Body_Shard) ProtoMessage() {} + +func (x *ReviveObjectResponse_Body_Shard) ProtoReflect() protoreflect.Message { + mi := &file_pkg_services_control_service_proto_msgTypes[54] + 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 ReviveObjectResponse_Body_Shard.ProtoReflect.Descriptor instead. +func (*ReviveObjectResponse_Body_Shard) Descriptor() ([]byte, []int) { + return file_pkg_services_control_service_proto_rawDescGZIP(), []int{25, 0, 0} +} + +func (x *ReviveObjectResponse_Body_Shard) GetShardId() string { + if x != nil { + return x.ShardId + } + return "" +} + +func (x *ReviveObjectResponse_Body_Shard) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + var File_pkg_services_control_service_proto protoreflect.FileDescriptor var file_pkg_services_control_service_proto_rawDesc = []byte{ @@ -2981,70 +3253,102 @@ var file_pkg_services_control_service_proto_rawDesc = []byte{ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x34, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0xa5, 0x07, - 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, 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, 0x4a, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 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, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 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, 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, 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, 0x12, 0x45, 0x0a, 0x0a, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, - 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xad, 0x01, + 0x0a, 0x13, 0x52, 0x65, 0x76, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, + 0x76, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 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, 0x2d, + 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x87, 0x02, + 0x0a, 0x14, 0x52, 0x65, 0x76, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x52, + 0x65, 0x76, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 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, 0x84, 0x01, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x40, 0x0a, 0x06, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x1a, 0x3a, 0x0a, 0x05, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0xf2, 0x07, 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, 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, 0x4a, 0x0a, 0x0b, 0x4c, + 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 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, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 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, 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, 0x72, 0x6f, 0x6c, - 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, + 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, 0x12, 0x45, 0x0a, 0x0a, 0x46, + 0x6c, 0x75, 0x73, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x46, 0x6c, 0x75, 0x73, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4b, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x76, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x76, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 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 ( @@ -3059,7 +3363,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, 50) +var file_pkg_services_control_service_proto_msgTypes = make([]protoimpl.MessageInfo, 55) var file_pkg_services_control_service_proto_goTypes = []interface{}{ (*HealthCheckRequest)(nil), // 0: control.HealthCheckRequest (*HealthCheckResponse)(nil), // 1: control.HealthCheckResponse @@ -3085,123 +3389,135 @@ var file_pkg_services_control_service_proto_goTypes = []interface{}{ (*FlushCacheResponse)(nil), // 21: control.FlushCacheResponse (*ObjectStatusRequest)(nil), // 22: control.ObjectStatusRequest (*ObjectStatusResponse)(nil), // 23: control.ObjectStatusResponse - (*HealthCheckRequest_Body)(nil), // 24: control.HealthCheckRequest.Body - (*HealthCheckResponse_Body)(nil), // 25: control.HealthCheckResponse.Body - (*SetNetmapStatusRequest_Body)(nil), // 26: control.SetNetmapStatusRequest.Body - (*SetNetmapStatusResponse_Body)(nil), // 27: control.SetNetmapStatusResponse.Body - (*DropObjectsRequest_Body)(nil), // 28: control.DropObjectsRequest.Body - (*DropObjectsResponse_Body)(nil), // 29: control.DropObjectsResponse.Body - (*ListShardsRequest_Body)(nil), // 30: control.ListShardsRequest.Body - (*ListShardsResponse_Body)(nil), // 31: control.ListShardsResponse.Body - (*ListObjectsRequest_Body)(nil), // 32: control.ListObjectsRequest.Body - (*ListObjectsResponse_Body)(nil), // 33: control.ListObjectsResponse.Body - (*SetShardModeRequest_Body)(nil), // 34: control.SetShardModeRequest.Body - (*SetShardModeResponse_Body)(nil), // 35: control.SetShardModeResponse.Body - (*DumpShardRequest_Body)(nil), // 36: control.DumpShardRequest.Body - (*DumpShardResponse_Body)(nil), // 37: control.DumpShardResponse.Body - (*RestoreShardRequest_Body)(nil), // 38: control.RestoreShardRequest.Body - (*RestoreShardResponse_Body)(nil), // 39: control.RestoreShardResponse.Body - (*SynchronizeTreeRequest_Body)(nil), // 40: control.SynchronizeTreeRequest.Body - (*SynchronizeTreeResponse_Body)(nil), // 41: control.SynchronizeTreeResponse.Body - (*EvacuateShardRequest_Body)(nil), // 42: control.EvacuateShardRequest.Body - (*EvacuateShardResponse_Body)(nil), // 43: control.EvacuateShardResponse.Body - (*FlushCacheRequest_Body)(nil), // 44: control.FlushCacheRequest.Body - (*FlushCacheResponse_Body)(nil), // 45: control.FlushCacheResponse.Body - (*ObjectStatusRequest_Body)(nil), // 46: control.ObjectStatusRequest.Body - (*ObjectStatusResponse_Body)(nil), // 47: control.ObjectStatusResponse.Body - (*ObjectStatusResponse_Body_Shard)(nil), // 48: control.ObjectStatusResponse.Body.Shard - (*ObjectStatusResponse_Body_Shard_Status)(nil), // 49: control.ObjectStatusResponse.Body.Shard.Status - (*Signature)(nil), // 50: control.Signature - (NetmapStatus)(0), // 51: control.NetmapStatus - (HealthStatus)(0), // 52: control.HealthStatus - (*ShardInfo)(nil), // 53: control.ShardInfo - (ShardMode)(0), // 54: control.ShardMode + (*ReviveObjectRequest)(nil), // 24: control.ReviveObjectRequest + (*ReviveObjectResponse)(nil), // 25: control.ReviveObjectResponse + (*HealthCheckRequest_Body)(nil), // 26: control.HealthCheckRequest.Body + (*HealthCheckResponse_Body)(nil), // 27: control.HealthCheckResponse.Body + (*SetNetmapStatusRequest_Body)(nil), // 28: control.SetNetmapStatusRequest.Body + (*SetNetmapStatusResponse_Body)(nil), // 29: control.SetNetmapStatusResponse.Body + (*DropObjectsRequest_Body)(nil), // 30: control.DropObjectsRequest.Body + (*DropObjectsResponse_Body)(nil), // 31: control.DropObjectsResponse.Body + (*ListShardsRequest_Body)(nil), // 32: control.ListShardsRequest.Body + (*ListShardsResponse_Body)(nil), // 33: control.ListShardsResponse.Body + (*ListObjectsRequest_Body)(nil), // 34: control.ListObjectsRequest.Body + (*ListObjectsResponse_Body)(nil), // 35: control.ListObjectsResponse.Body + (*SetShardModeRequest_Body)(nil), // 36: control.SetShardModeRequest.Body + (*SetShardModeResponse_Body)(nil), // 37: control.SetShardModeResponse.Body + (*DumpShardRequest_Body)(nil), // 38: control.DumpShardRequest.Body + (*DumpShardResponse_Body)(nil), // 39: control.DumpShardResponse.Body + (*RestoreShardRequest_Body)(nil), // 40: control.RestoreShardRequest.Body + (*RestoreShardResponse_Body)(nil), // 41: control.RestoreShardResponse.Body + (*SynchronizeTreeRequest_Body)(nil), // 42: control.SynchronizeTreeRequest.Body + (*SynchronizeTreeResponse_Body)(nil), // 43: control.SynchronizeTreeResponse.Body + (*EvacuateShardRequest_Body)(nil), // 44: control.EvacuateShardRequest.Body + (*EvacuateShardResponse_Body)(nil), // 45: control.EvacuateShardResponse.Body + (*FlushCacheRequest_Body)(nil), // 46: control.FlushCacheRequest.Body + (*FlushCacheResponse_Body)(nil), // 47: control.FlushCacheResponse.Body + (*ObjectStatusRequest_Body)(nil), // 48: control.ObjectStatusRequest.Body + (*ObjectStatusResponse_Body)(nil), // 49: control.ObjectStatusResponse.Body + (*ObjectStatusResponse_Body_Shard)(nil), // 50: control.ObjectStatusResponse.Body.Shard + (*ObjectStatusResponse_Body_Shard_Status)(nil), // 51: control.ObjectStatusResponse.Body.Shard.Status + (*ReviveObjectRequest_Body)(nil), // 52: control.ReviveObjectRequest.Body + (*ReviveObjectResponse_Body)(nil), // 53: control.ReviveObjectResponse.Body + (*ReviveObjectResponse_Body_Shard)(nil), // 54: control.ReviveObjectResponse.Body.Shard + (*Signature)(nil), // 55: control.Signature + (NetmapStatus)(0), // 56: control.NetmapStatus + (HealthStatus)(0), // 57: control.HealthStatus + (*ShardInfo)(nil), // 58: control.ShardInfo + (ShardMode)(0), // 59: control.ShardMode } var file_pkg_services_control_service_proto_depIdxs = []int32{ - 24, // 0: control.HealthCheckRequest.body:type_name -> control.HealthCheckRequest.Body - 50, // 1: control.HealthCheckRequest.signature:type_name -> control.Signature - 25, // 2: control.HealthCheckResponse.body:type_name -> control.HealthCheckResponse.Body - 50, // 3: control.HealthCheckResponse.signature:type_name -> control.Signature - 26, // 4: control.SetNetmapStatusRequest.body:type_name -> control.SetNetmapStatusRequest.Body - 50, // 5: control.SetNetmapStatusRequest.signature:type_name -> control.Signature - 27, // 6: control.SetNetmapStatusResponse.body:type_name -> control.SetNetmapStatusResponse.Body - 50, // 7: control.SetNetmapStatusResponse.signature:type_name -> control.Signature - 28, // 8: control.DropObjectsRequest.body:type_name -> control.DropObjectsRequest.Body - 50, // 9: control.DropObjectsRequest.signature:type_name -> control.Signature - 29, // 10: control.DropObjectsResponse.body:type_name -> control.DropObjectsResponse.Body - 50, // 11: control.DropObjectsResponse.signature:type_name -> control.Signature - 30, // 12: control.ListShardsRequest.body:type_name -> control.ListShardsRequest.Body - 50, // 13: control.ListShardsRequest.signature:type_name -> control.Signature - 31, // 14: control.ListShardsResponse.body:type_name -> control.ListShardsResponse.Body - 50, // 15: control.ListShardsResponse.signature:type_name -> control.Signature - 32, // 16: control.ListObjectsRequest.body:type_name -> control.ListObjectsRequest.Body - 50, // 17: control.ListObjectsRequest.signature:type_name -> control.Signature - 33, // 18: control.ListObjectsResponse.body:type_name -> control.ListObjectsResponse.Body - 50, // 19: control.ListObjectsResponse.signature:type_name -> control.Signature - 34, // 20: control.SetShardModeRequest.body:type_name -> control.SetShardModeRequest.Body - 50, // 21: control.SetShardModeRequest.signature:type_name -> control.Signature - 35, // 22: control.SetShardModeResponse.body:type_name -> control.SetShardModeResponse.Body - 50, // 23: control.SetShardModeResponse.signature:type_name -> control.Signature - 36, // 24: control.DumpShardRequest.body:type_name -> control.DumpShardRequest.Body - 50, // 25: control.DumpShardRequest.signature:type_name -> control.Signature - 37, // 26: control.DumpShardResponse.body:type_name -> control.DumpShardResponse.Body - 50, // 27: control.DumpShardResponse.signature:type_name -> control.Signature - 38, // 28: control.RestoreShardRequest.body:type_name -> control.RestoreShardRequest.Body - 50, // 29: control.RestoreShardRequest.signature:type_name -> control.Signature - 39, // 30: control.RestoreShardResponse.body:type_name -> control.RestoreShardResponse.Body - 50, // 31: control.RestoreShardResponse.signature:type_name -> control.Signature - 40, // 32: control.SynchronizeTreeRequest.body:type_name -> control.SynchronizeTreeRequest.Body - 50, // 33: control.SynchronizeTreeRequest.signature:type_name -> control.Signature - 41, // 34: control.SynchronizeTreeResponse.body:type_name -> control.SynchronizeTreeResponse.Body - 50, // 35: control.SynchronizeTreeResponse.signature:type_name -> control.Signature - 42, // 36: control.EvacuateShardRequest.body:type_name -> control.EvacuateShardRequest.Body - 50, // 37: control.EvacuateShardRequest.signature:type_name -> control.Signature - 43, // 38: control.EvacuateShardResponse.body:type_name -> control.EvacuateShardResponse.Body - 50, // 39: control.EvacuateShardResponse.signature:type_name -> control.Signature - 44, // 40: control.FlushCacheRequest.body:type_name -> control.FlushCacheRequest.Body - 50, // 41: control.FlushCacheRequest.signature:type_name -> control.Signature - 45, // 42: control.FlushCacheResponse.body:type_name -> control.FlushCacheResponse.Body - 50, // 43: control.FlushCacheResponse.signature:type_name -> control.Signature - 46, // 44: control.ObjectStatusRequest.body:type_name -> control.ObjectStatusRequest.Body - 50, // 45: control.ObjectStatusRequest.signature:type_name -> control.Signature - 47, // 46: control.ObjectStatusResponse.body:type_name -> control.ObjectStatusResponse.Body - 50, // 47: control.ObjectStatusResponse.signature:type_name -> control.Signature - 51, // 48: control.HealthCheckResponse.Body.netmap_status:type_name -> control.NetmapStatus - 52, // 49: control.HealthCheckResponse.Body.health_status:type_name -> control.HealthStatus - 51, // 50: control.SetNetmapStatusRequest.Body.status:type_name -> control.NetmapStatus - 53, // 51: control.ListShardsResponse.Body.shards:type_name -> control.ShardInfo - 54, // 52: control.SetShardModeRequest.Body.mode:type_name -> control.ShardMode - 48, // 53: control.ObjectStatusResponse.Body.shards:type_name -> control.ObjectStatusResponse.Body.Shard - 49, // 54: control.ObjectStatusResponse.Body.Shard.storages:type_name -> control.ObjectStatusResponse.Body.Shard.Status - 0, // 55: control.ControlService.HealthCheck:input_type -> control.HealthCheckRequest - 2, // 56: control.ControlService.SetNetmapStatus:input_type -> control.SetNetmapStatusRequest - 4, // 57: control.ControlService.DropObjects:input_type -> control.DropObjectsRequest - 6, // 58: control.ControlService.ListShards:input_type -> control.ListShardsRequest - 8, // 59: control.ControlService.ListObjects:input_type -> control.ListObjectsRequest - 10, // 60: control.ControlService.SetShardMode:input_type -> control.SetShardModeRequest - 12, // 61: control.ControlService.DumpShard:input_type -> control.DumpShardRequest - 14, // 62: control.ControlService.RestoreShard:input_type -> control.RestoreShardRequest - 16, // 63: control.ControlService.SynchronizeTree:input_type -> control.SynchronizeTreeRequest - 18, // 64: control.ControlService.EvacuateShard:input_type -> control.EvacuateShardRequest - 20, // 65: control.ControlService.FlushCache:input_type -> control.FlushCacheRequest - 22, // 66: control.ControlService.ObjectStatus:input_type -> control.ObjectStatusRequest - 1, // 67: control.ControlService.HealthCheck:output_type -> control.HealthCheckResponse - 3, // 68: control.ControlService.SetNetmapStatus:output_type -> control.SetNetmapStatusResponse - 5, // 69: control.ControlService.DropObjects:output_type -> control.DropObjectsResponse - 7, // 70: control.ControlService.ListShards:output_type -> control.ListShardsResponse - 9, // 71: control.ControlService.ListObjects:output_type -> control.ListObjectsResponse - 11, // 72: control.ControlService.SetShardMode:output_type -> control.SetShardModeResponse - 13, // 73: control.ControlService.DumpShard:output_type -> control.DumpShardResponse - 15, // 74: control.ControlService.RestoreShard:output_type -> control.RestoreShardResponse - 17, // 75: control.ControlService.SynchronizeTree:output_type -> control.SynchronizeTreeResponse - 19, // 76: control.ControlService.EvacuateShard:output_type -> control.EvacuateShardResponse - 21, // 77: control.ControlService.FlushCache:output_type -> control.FlushCacheResponse - 23, // 78: control.ControlService.ObjectStatus:output_type -> control.ObjectStatusResponse - 67, // [67:79] is the sub-list for method output_type - 55, // [55:67] is the sub-list for method input_type - 55, // [55:55] is the sub-list for extension type_name - 55, // [55:55] is the sub-list for extension extendee - 0, // [0:55] is the sub-list for field type_name + 26, // 0: control.HealthCheckRequest.body:type_name -> control.HealthCheckRequest.Body + 55, // 1: control.HealthCheckRequest.signature:type_name -> control.Signature + 27, // 2: control.HealthCheckResponse.body:type_name -> control.HealthCheckResponse.Body + 55, // 3: control.HealthCheckResponse.signature:type_name -> control.Signature + 28, // 4: control.SetNetmapStatusRequest.body:type_name -> control.SetNetmapStatusRequest.Body + 55, // 5: control.SetNetmapStatusRequest.signature:type_name -> control.Signature + 29, // 6: control.SetNetmapStatusResponse.body:type_name -> control.SetNetmapStatusResponse.Body + 55, // 7: control.SetNetmapStatusResponse.signature:type_name -> control.Signature + 30, // 8: control.DropObjectsRequest.body:type_name -> control.DropObjectsRequest.Body + 55, // 9: control.DropObjectsRequest.signature:type_name -> control.Signature + 31, // 10: control.DropObjectsResponse.body:type_name -> control.DropObjectsResponse.Body + 55, // 11: control.DropObjectsResponse.signature:type_name -> control.Signature + 32, // 12: control.ListShardsRequest.body:type_name -> control.ListShardsRequest.Body + 55, // 13: control.ListShardsRequest.signature:type_name -> control.Signature + 33, // 14: control.ListShardsResponse.body:type_name -> control.ListShardsResponse.Body + 55, // 15: control.ListShardsResponse.signature:type_name -> control.Signature + 34, // 16: control.ListObjectsRequest.body:type_name -> control.ListObjectsRequest.Body + 55, // 17: control.ListObjectsRequest.signature:type_name -> control.Signature + 35, // 18: control.ListObjectsResponse.body:type_name -> control.ListObjectsResponse.Body + 55, // 19: control.ListObjectsResponse.signature:type_name -> control.Signature + 36, // 20: control.SetShardModeRequest.body:type_name -> control.SetShardModeRequest.Body + 55, // 21: control.SetShardModeRequest.signature:type_name -> control.Signature + 37, // 22: control.SetShardModeResponse.body:type_name -> control.SetShardModeResponse.Body + 55, // 23: control.SetShardModeResponse.signature:type_name -> control.Signature + 38, // 24: control.DumpShardRequest.body:type_name -> control.DumpShardRequest.Body + 55, // 25: control.DumpShardRequest.signature:type_name -> control.Signature + 39, // 26: control.DumpShardResponse.body:type_name -> control.DumpShardResponse.Body + 55, // 27: control.DumpShardResponse.signature:type_name -> control.Signature + 40, // 28: control.RestoreShardRequest.body:type_name -> control.RestoreShardRequest.Body + 55, // 29: control.RestoreShardRequest.signature:type_name -> control.Signature + 41, // 30: control.RestoreShardResponse.body:type_name -> control.RestoreShardResponse.Body + 55, // 31: control.RestoreShardResponse.signature:type_name -> control.Signature + 42, // 32: control.SynchronizeTreeRequest.body:type_name -> control.SynchronizeTreeRequest.Body + 55, // 33: control.SynchronizeTreeRequest.signature:type_name -> control.Signature + 43, // 34: control.SynchronizeTreeResponse.body:type_name -> control.SynchronizeTreeResponse.Body + 55, // 35: control.SynchronizeTreeResponse.signature:type_name -> control.Signature + 44, // 36: control.EvacuateShardRequest.body:type_name -> control.EvacuateShardRequest.Body + 55, // 37: control.EvacuateShardRequest.signature:type_name -> control.Signature + 45, // 38: control.EvacuateShardResponse.body:type_name -> control.EvacuateShardResponse.Body + 55, // 39: control.EvacuateShardResponse.signature:type_name -> control.Signature + 46, // 40: control.FlushCacheRequest.body:type_name -> control.FlushCacheRequest.Body + 55, // 41: control.FlushCacheRequest.signature:type_name -> control.Signature + 47, // 42: control.FlushCacheResponse.body:type_name -> control.FlushCacheResponse.Body + 55, // 43: control.FlushCacheResponse.signature:type_name -> control.Signature + 48, // 44: control.ObjectStatusRequest.body:type_name -> control.ObjectStatusRequest.Body + 55, // 45: control.ObjectStatusRequest.signature:type_name -> control.Signature + 49, // 46: control.ObjectStatusResponse.body:type_name -> control.ObjectStatusResponse.Body + 55, // 47: control.ObjectStatusResponse.signature:type_name -> control.Signature + 52, // 48: control.ReviveObjectRequest.body:type_name -> control.ReviveObjectRequest.Body + 55, // 49: control.ReviveObjectRequest.signature:type_name -> control.Signature + 53, // 50: control.ReviveObjectResponse.body:type_name -> control.ReviveObjectResponse.Body + 55, // 51: control.ReviveObjectResponse.signature:type_name -> control.Signature + 56, // 52: control.HealthCheckResponse.Body.netmap_status:type_name -> control.NetmapStatus + 57, // 53: control.HealthCheckResponse.Body.health_status:type_name -> control.HealthStatus + 56, // 54: control.SetNetmapStatusRequest.Body.status:type_name -> control.NetmapStatus + 58, // 55: control.ListShardsResponse.Body.shards:type_name -> control.ShardInfo + 59, // 56: control.SetShardModeRequest.Body.mode:type_name -> control.ShardMode + 50, // 57: control.ObjectStatusResponse.Body.shards:type_name -> control.ObjectStatusResponse.Body.Shard + 51, // 58: control.ObjectStatusResponse.Body.Shard.storages:type_name -> control.ObjectStatusResponse.Body.Shard.Status + 54, // 59: control.ReviveObjectResponse.Body.shards:type_name -> control.ReviveObjectResponse.Body.Shard + 0, // 60: control.ControlService.HealthCheck:input_type -> control.HealthCheckRequest + 2, // 61: control.ControlService.SetNetmapStatus:input_type -> control.SetNetmapStatusRequest + 4, // 62: control.ControlService.DropObjects:input_type -> control.DropObjectsRequest + 6, // 63: control.ControlService.ListShards:input_type -> control.ListShardsRequest + 8, // 64: control.ControlService.ListObjects:input_type -> control.ListObjectsRequest + 10, // 65: control.ControlService.SetShardMode:input_type -> control.SetShardModeRequest + 12, // 66: control.ControlService.DumpShard:input_type -> control.DumpShardRequest + 14, // 67: control.ControlService.RestoreShard:input_type -> control.RestoreShardRequest + 16, // 68: control.ControlService.SynchronizeTree:input_type -> control.SynchronizeTreeRequest + 18, // 69: control.ControlService.EvacuateShard:input_type -> control.EvacuateShardRequest + 20, // 70: control.ControlService.FlushCache:input_type -> control.FlushCacheRequest + 22, // 71: control.ControlService.ObjectStatus:input_type -> control.ObjectStatusRequest + 24, // 72: control.ControlService.ReviveObject:input_type -> control.ReviveObjectRequest + 1, // 73: control.ControlService.HealthCheck:output_type -> control.HealthCheckResponse + 3, // 74: control.ControlService.SetNetmapStatus:output_type -> control.SetNetmapStatusResponse + 5, // 75: control.ControlService.DropObjects:output_type -> control.DropObjectsResponse + 7, // 76: control.ControlService.ListShards:output_type -> control.ListShardsResponse + 9, // 77: control.ControlService.ListObjects:output_type -> control.ListObjectsResponse + 11, // 78: control.ControlService.SetShardMode:output_type -> control.SetShardModeResponse + 13, // 79: control.ControlService.DumpShard:output_type -> control.DumpShardResponse + 15, // 80: control.ControlService.RestoreShard:output_type -> control.RestoreShardResponse + 17, // 81: control.ControlService.SynchronizeTree:output_type -> control.SynchronizeTreeResponse + 19, // 82: control.ControlService.EvacuateShard:output_type -> control.EvacuateShardResponse + 21, // 83: control.ControlService.FlushCache:output_type -> control.FlushCacheResponse + 23, // 84: control.ControlService.ObjectStatus:output_type -> control.ObjectStatusResponse + 25, // 85: control.ControlService.ReviveObject:output_type -> control.ReviveObjectResponse + 73, // [73:86] is the sub-list for method output_type + 60, // [60:73] is the sub-list for method input_type + 60, // [60:60] is the sub-list for extension type_name + 60, // [60:60] is the sub-list for extension extendee + 0, // [0:60] is the sub-list for field type_name } func init() { file_pkg_services_control_service_proto_init() } @@ -3500,7 +3816,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.(*HealthCheckRequest_Body); i { + switch v := v.(*ReviveObjectRequest); i { case 0: return &v.state case 1: @@ -3512,7 +3828,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.(*HealthCheckResponse_Body); i { + switch v := v.(*ReviveObjectResponse); i { case 0: return &v.state case 1: @@ -3524,7 +3840,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.(*SetNetmapStatusRequest_Body); i { + switch v := v.(*HealthCheckRequest_Body); i { case 0: return &v.state case 1: @@ -3536,7 +3852,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.(*SetNetmapStatusResponse_Body); i { + switch v := v.(*HealthCheckResponse_Body); i { case 0: return &v.state case 1: @@ -3548,7 +3864,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.(*DropObjectsRequest_Body); i { + switch v := v.(*SetNetmapStatusRequest_Body); i { case 0: return &v.state case 1: @@ -3560,7 +3876,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.(*DropObjectsResponse_Body); i { + switch v := v.(*SetNetmapStatusResponse_Body); i { case 0: return &v.state case 1: @@ -3572,7 +3888,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.(*ListShardsRequest_Body); i { + switch v := v.(*DropObjectsRequest_Body); i { case 0: return &v.state case 1: @@ -3584,7 +3900,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.(*ListShardsResponse_Body); i { + switch v := v.(*DropObjectsResponse_Body); i { case 0: return &v.state case 1: @@ -3596,7 +3912,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.(*ListObjectsRequest_Body); i { + switch v := v.(*ListShardsRequest_Body); i { case 0: return &v.state case 1: @@ -3608,7 +3924,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.(*ListObjectsResponse_Body); i { + switch v := v.(*ListShardsResponse_Body); i { case 0: return &v.state case 1: @@ -3620,7 +3936,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.(*SetShardModeRequest_Body); i { + switch v := v.(*ListObjectsRequest_Body); i { case 0: return &v.state case 1: @@ -3632,7 +3948,7 @@ 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.(*SetShardModeResponse_Body); i { + switch v := v.(*ListObjectsResponse_Body); i { case 0: return &v.state case 1: @@ -3644,7 +3960,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[36].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: @@ -3656,7 +3972,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[37].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: @@ -3668,7 +3984,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[38].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: @@ -3680,7 +3996,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[39].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: @@ -3692,7 +4008,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[40].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: @@ -3704,7 +4020,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SynchronizeTreeResponse_Body); i { + switch v := v.(*RestoreShardResponse_Body); i { case 0: return &v.state case 1: @@ -3716,7 +4032,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvacuateShardRequest_Body); i { + switch v := v.(*SynchronizeTreeRequest_Body); i { case 0: return &v.state case 1: @@ -3728,7 +4044,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvacuateShardResponse_Body); i { + switch v := v.(*SynchronizeTreeResponse_Body); i { case 0: return &v.state case 1: @@ -3740,7 +4056,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlushCacheRequest_Body); i { + switch v := v.(*EvacuateShardRequest_Body); i { case 0: return &v.state case 1: @@ -3752,7 +4068,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlushCacheResponse_Body); i { + switch v := v.(*EvacuateShardResponse_Body); i { case 0: return &v.state case 1: @@ -3764,7 +4080,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObjectStatusRequest_Body); i { + switch v := v.(*FlushCacheRequest_Body); i { case 0: return &v.state case 1: @@ -3776,7 +4092,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObjectStatusResponse_Body); i { + switch v := v.(*FlushCacheResponse_Body); i { case 0: return &v.state case 1: @@ -3788,7 +4104,7 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObjectStatusResponse_Body_Shard); i { + switch v := v.(*ObjectStatusRequest_Body); i { case 0: return &v.state case 1: @@ -3800,6 +4116,30 @@ func file_pkg_services_control_service_proto_init() { } } file_pkg_services_control_service_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObjectStatusResponse_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[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObjectStatusResponse_Body_Shard); 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[51].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ObjectStatusResponse_Body_Shard_Status); i { case 0: return &v.state @@ -3811,6 +4151,42 @@ func file_pkg_services_control_service_proto_init() { return nil } } + file_pkg_services_control_service_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReviveObjectRequest_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[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReviveObjectResponse_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[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReviveObjectResponse_Body_Shard); 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{ @@ -3818,7 +4194,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: 50, + NumMessages: 55, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/services/control/service.proto b/pkg/services/control/service.proto index 8f50a8562e..46b74cbf7c 100644 --- a/pkg/services/control/service.proto +++ b/pkg/services/control/service.proto @@ -43,6 +43,9 @@ service ControlService { // ObjectStatus requests object status in the storage engine. rpc ObjectStatus (ObjectStatusRequest) returns (ObjectStatusResponse); + + // ReviveObject purge all removal marks from all metabases for object. + rpc ReviveObject (ReviveObjectRequest) returns (ReviveObjectResponse); } // Health check request. @@ -425,3 +428,41 @@ message ObjectStatusResponse { // Body signature. Signature signature = 2; } + +// ReviveObject request. +message ReviveObjectRequest { + // Request body structure. + message Body { + // Requested object. + bytes object_address = 1; + } + + // Body of revive object request message. + Body body = 1; + + // Body signature. + Signature signature = 2; +} + +// ReviveObject response. +message ReviveObjectResponse { + // Response body structure. + message Body { + // Information about of object's revival status from a single shard. + message Shard { + // String presentation of shard ID. + string shard_id = 1; + // Object's revival status in a free form (human readable). + string status = 2; + } + + // Engine's shards in which the object was revived. + repeated Shard shards = 1; + } + + // Body of revive object response message. + Body body = 1; + + // Body signature. + Signature signature = 2; +} diff --git a/pkg/services/control/service_grpc.pb.go b/pkg/services/control/service_grpc.pb.go index 1751e2f753..e9dbef14ef 100644 --- a/pkg/services/control/service_grpc.pb.go +++ b/pkg/services/control/service_grpc.pb.go @@ -31,11 +31,14 @@ const ( ControlService_EvacuateShard_FullMethodName = "/control.ControlService/EvacuateShard" ControlService_FlushCache_FullMethodName = "/control.ControlService/FlushCache" ControlService_ObjectStatus_FullMethodName = "/control.ControlService/ObjectStatus" + ControlService_ReviveObject_FullMethodName = "/control.ControlService/ReviveObject" ) // ControlServiceClient is the client API for ControlService service. // // 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. +// +// `ControlService` provides an interface for internal work with the storage node. type ControlServiceClient interface { // Performs health check of the storage node. HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) @@ -46,7 +49,7 @@ type ControlServiceClient interface { // Returns list that contains information about all shards of a node. ListShards(ctx context.Context, in *ListShardsRequest, opts ...grpc.CallOption) (*ListShardsResponse, error) // Returns list that contains information about all objects in a node. - ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (ControlService_ListObjectsClient, error) + ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListObjectsResponse], error) // Sets mode of the shard. SetShardMode(ctx context.Context, in *SetShardModeRequest, opts ...grpc.CallOption) (*SetShardModeResponse, error) // Dump objects from the shard. @@ -61,6 +64,8 @@ type ControlServiceClient interface { FlushCache(ctx context.Context, in *FlushCacheRequest, opts ...grpc.CallOption) (*FlushCacheResponse, error) // ObjectStatus requests object status in the storage engine. ObjectStatus(ctx context.Context, in *ObjectStatusRequest, opts ...grpc.CallOption) (*ObjectStatusResponse, error) + // ReviveObject purge all removal marks from all metabases for object. + ReviveObject(ctx context.Context, in *ReviveObjectRequest, opts ...grpc.CallOption) (*ReviveObjectResponse, error) } type controlServiceClient struct { @@ -72,8 +77,9 @@ func NewControlServiceClient(cc grpc.ClientConnInterface) ControlServiceClient { } func (c *controlServiceClient) HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(HealthCheckResponse) - err := c.cc.Invoke(ctx, ControlService_HealthCheck_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlService_HealthCheck_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -81,8 +87,9 @@ func (c *controlServiceClient) HealthCheck(ctx context.Context, in *HealthCheckR } func (c *controlServiceClient) SetNetmapStatus(ctx context.Context, in *SetNetmapStatusRequest, opts ...grpc.CallOption) (*SetNetmapStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetNetmapStatusResponse) - err := c.cc.Invoke(ctx, ControlService_SetNetmapStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlService_SetNetmapStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -90,8 +97,9 @@ func (c *controlServiceClient) SetNetmapStatus(ctx context.Context, in *SetNetma } func (c *controlServiceClient) DropObjects(ctx context.Context, in *DropObjectsRequest, opts ...grpc.CallOption) (*DropObjectsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DropObjectsResponse) - err := c.cc.Invoke(ctx, ControlService_DropObjects_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlService_DropObjects_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -99,20 +107,22 @@ func (c *controlServiceClient) DropObjects(ctx context.Context, in *DropObjectsR } func (c *controlServiceClient) ListShards(ctx context.Context, in *ListShardsRequest, opts ...grpc.CallOption) (*ListShardsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListShardsResponse) - err := c.cc.Invoke(ctx, ControlService_ListShards_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlService_ListShards_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *controlServiceClient) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (ControlService_ListObjectsClient, error) { - stream, err := c.cc.NewStream(ctx, &ControlService_ServiceDesc.Streams[0], ControlService_ListObjects_FullMethodName, opts...) +func (c *controlServiceClient) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListObjectsResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ControlService_ServiceDesc.Streams[0], ControlService_ListObjects_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &controlServiceListObjectsClient{stream} + x := &grpc.GenericClientStream[ListObjectsRequest, ListObjectsResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -122,26 +132,13 @@ func (c *controlServiceClient) ListObjects(ctx context.Context, in *ListObjectsR return x, nil } -type ControlService_ListObjectsClient interface { - Recv() (*ListObjectsResponse, error) - grpc.ClientStream -} - -type controlServiceListObjectsClient struct { - grpc.ClientStream -} - -func (x *controlServiceListObjectsClient) Recv() (*ListObjectsResponse, error) { - m := new(ListObjectsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ControlService_ListObjectsClient = grpc.ServerStreamingClient[ListObjectsResponse] func (c *controlServiceClient) SetShardMode(ctx context.Context, in *SetShardModeRequest, opts ...grpc.CallOption) (*SetShardModeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetShardModeResponse) - err := c.cc.Invoke(ctx, ControlService_SetShardMode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlService_SetShardMode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -149,8 +146,9 @@ func (c *controlServiceClient) SetShardMode(ctx context.Context, in *SetShardMod } func (c *controlServiceClient) DumpShard(ctx context.Context, in *DumpShardRequest, opts ...grpc.CallOption) (*DumpShardResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DumpShardResponse) - err := c.cc.Invoke(ctx, ControlService_DumpShard_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlService_DumpShard_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -158,8 +156,9 @@ func (c *controlServiceClient) DumpShard(ctx context.Context, in *DumpShardReque } func (c *controlServiceClient) RestoreShard(ctx context.Context, in *RestoreShardRequest, opts ...grpc.CallOption) (*RestoreShardResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RestoreShardResponse) - err := c.cc.Invoke(ctx, ControlService_RestoreShard_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlService_RestoreShard_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -167,8 +166,9 @@ func (c *controlServiceClient) RestoreShard(ctx context.Context, in *RestoreShar } func (c *controlServiceClient) SynchronizeTree(ctx context.Context, in *SynchronizeTreeRequest, opts ...grpc.CallOption) (*SynchronizeTreeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SynchronizeTreeResponse) - err := c.cc.Invoke(ctx, ControlService_SynchronizeTree_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlService_SynchronizeTree_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -176,8 +176,9 @@ func (c *controlServiceClient) SynchronizeTree(ctx context.Context, in *Synchron } func (c *controlServiceClient) EvacuateShard(ctx context.Context, in *EvacuateShardRequest, opts ...grpc.CallOption) (*EvacuateShardResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EvacuateShardResponse) - err := c.cc.Invoke(ctx, ControlService_EvacuateShard_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlService_EvacuateShard_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -185,8 +186,9 @@ func (c *controlServiceClient) EvacuateShard(ctx context.Context, in *EvacuateSh } func (c *controlServiceClient) FlushCache(ctx context.Context, in *FlushCacheRequest, opts ...grpc.CallOption) (*FlushCacheResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FlushCacheResponse) - err := c.cc.Invoke(ctx, ControlService_FlushCache_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlService_FlushCache_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -194,8 +196,19 @@ func (c *controlServiceClient) FlushCache(ctx context.Context, in *FlushCacheReq } func (c *controlServiceClient) ObjectStatus(ctx context.Context, in *ObjectStatusRequest, opts ...grpc.CallOption) (*ObjectStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ObjectStatusResponse) - err := c.cc.Invoke(ctx, ControlService_ObjectStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlService_ObjectStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlServiceClient) ReviveObject(ctx context.Context, in *ReviveObjectRequest, opts ...grpc.CallOption) (*ReviveObjectResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ReviveObjectResponse) + err := c.cc.Invoke(ctx, ControlService_ReviveObject_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -204,7 +217,9 @@ func (c *controlServiceClient) ObjectStatus(ctx context.Context, in *ObjectStatu // ControlServiceServer is the server API for ControlService service. // All implementations should embed UnimplementedControlServiceServer -// for forward compatibility +// for forward compatibility. +// +// `ControlService` provides an interface for internal work with the storage node. type ControlServiceServer interface { // Performs health check of the storage node. HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) @@ -215,7 +230,7 @@ type ControlServiceServer interface { // Returns list that contains information about all shards of a node. ListShards(context.Context, *ListShardsRequest) (*ListShardsResponse, error) // Returns list that contains information about all objects in a node. - ListObjects(*ListObjectsRequest, ControlService_ListObjectsServer) error + ListObjects(*ListObjectsRequest, grpc.ServerStreamingServer[ListObjectsResponse]) error // Sets mode of the shard. SetShardMode(context.Context, *SetShardModeRequest) (*SetShardModeResponse, error) // Dump objects from the shard. @@ -230,11 +245,16 @@ type ControlServiceServer interface { FlushCache(context.Context, *FlushCacheRequest) (*FlushCacheResponse, error) // ObjectStatus requests object status in the storage engine. ObjectStatus(context.Context, *ObjectStatusRequest) (*ObjectStatusResponse, error) + // ReviveObject purge all removal marks from all metabases for object. + ReviveObject(context.Context, *ReviveObjectRequest) (*ReviveObjectResponse, error) } -// UnimplementedControlServiceServer should be embedded to have forward compatible implementations. -type UnimplementedControlServiceServer struct { -} +// UnimplementedControlServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedControlServiceServer struct{} func (UnimplementedControlServiceServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HealthCheck not implemented") @@ -248,7 +268,7 @@ func (UnimplementedControlServiceServer) DropObjects(context.Context, *DropObjec func (UnimplementedControlServiceServer) ListShards(context.Context, *ListShardsRequest) (*ListShardsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListShards not implemented") } -func (UnimplementedControlServiceServer) ListObjects(*ListObjectsRequest, ControlService_ListObjectsServer) error { +func (UnimplementedControlServiceServer) ListObjects(*ListObjectsRequest, grpc.ServerStreamingServer[ListObjectsResponse]) error { return status.Errorf(codes.Unimplemented, "method ListObjects not implemented") } func (UnimplementedControlServiceServer) SetShardMode(context.Context, *SetShardModeRequest) (*SetShardModeResponse, error) { @@ -272,6 +292,10 @@ func (UnimplementedControlServiceServer) FlushCache(context.Context, *FlushCache func (UnimplementedControlServiceServer) ObjectStatus(context.Context, *ObjectStatusRequest) (*ObjectStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ObjectStatus not implemented") } +func (UnimplementedControlServiceServer) ReviveObject(context.Context, *ReviveObjectRequest) (*ReviveObjectResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReviveObject not implemented") +} +func (UnimplementedControlServiceServer) testEmbeddedByValue() {} // 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 @@ -281,6 +305,13 @@ type UnsafeControlServiceServer interface { } func RegisterControlServiceServer(s grpc.ServiceRegistrar, srv ControlServiceServer) { + // If the following call pancis, it indicates UnimplementedControlServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ControlService_ServiceDesc, srv) } @@ -361,21 +392,11 @@ func _ControlService_ListObjects_Handler(srv interface{}, stream grpc.ServerStre if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ControlServiceServer).ListObjects(m, &controlServiceListObjectsServer{stream}) + return srv.(ControlServiceServer).ListObjects(m, &grpc.GenericServerStream[ListObjectsRequest, ListObjectsResponse]{ServerStream: stream}) } -type ControlService_ListObjectsServer interface { - Send(*ListObjectsResponse) error - grpc.ServerStream -} - -type controlServiceListObjectsServer struct { - grpc.ServerStream -} - -func (x *controlServiceListObjectsServer) Send(m *ListObjectsResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ControlService_ListObjectsServer = grpc.ServerStreamingServer[ListObjectsResponse] func _ControlService_SetShardMode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SetShardModeRequest) @@ -503,6 +524,24 @@ func _ControlService_ObjectStatus_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _ControlService_ReviveObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReviveObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServiceServer).ReviveObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ControlService_ReviveObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServiceServer).ReviveObject(ctx, req.(*ReviveObjectRequest)) + } + 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) @@ -554,6 +593,10 @@ var ControlService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ObjectStatus", Handler: _ControlService_ObjectStatus_Handler, }, + { + MethodName: "ReviveObject", + Handler: _ControlService_ReviveObject_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/pkg/services/control/service_neofs.pb.go b/pkg/services/control/service_neofs.pb.go index ab25e7370c..3a02d7f120 100644 --- a/pkg/services/control/service_neofs.pb.go +++ b/pkg/services/control/service_neofs.pb.go @@ -1927,3 +1927,197 @@ func (x *ObjectStatusResponse) ReadSignedData(buf []byte) ([]byte, error) { func (x *ObjectStatusResponse) 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 *ReviveObjectRequest_Body) StableSize() (size int) { + size += proto.BytesSize(1, x.ObjectAddress) + 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 *ReviveObjectRequest_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.ObjectAddress) + return buf +} + +// StableSize returns the size of x in protobuf format. +// +// Structures with the same field values have the same binary size. +func (x *ReviveObjectRequest) 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 *ReviveObjectRequest) 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 *ReviveObjectRequest) 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 *ReviveObjectRequest) ReadSignedData(buf []byte) ([]byte, error) { + return x.GetBody().StableMarshal(buf), nil +} + +func (x *ReviveObjectRequest) 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 *ReviveObjectResponse_Body_Shard) StableSize() (size int) { + size += proto.StringSize(1, x.ShardId) + size += proto.StringSize(2, x.Status) + 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 *ReviveObjectResponse_Body_Shard) StableMarshal(buf []byte) []byte { + if x == nil { + return []byte{} + } + if buf == nil { + buf = make([]byte, x.StableSize()) + } + var offset int + offset += proto.StringMarshal(1, buf[offset:], x.ShardId) + offset += proto.StringMarshal(2, buf[offset:], x.Status) + return buf +} + +// StableSize returns the size of x in protobuf format. +// +// Structures with the same field values have the same binary size. +func (x *ReviveObjectResponse_Body) StableSize() (size int) { + for i := range x.Shards { + size += proto.NestedStructureSize(1, x.Shards[i]) + } + 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 *ReviveObjectResponse_Body) StableMarshal(buf []byte) []byte { + if x == nil { + return []byte{} + } + if buf == nil { + buf = make([]byte, x.StableSize()) + } + var offset int + for i := range x.Shards { + offset += proto.NestedStructureMarshal(1, buf[offset:], x.Shards[i]) + } + return buf +} + +// StableSize returns the size of x in protobuf format. +// +// Structures with the same field values have the same binary size. +func (x *ReviveObjectResponse) 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 *ReviveObjectResponse) 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 *ReviveObjectResponse) 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 *ReviveObjectResponse) ReadSignedData(buf []byte) ([]byte, error) { + return x.GetBody().StableMarshal(buf), nil +} + +func (x *ReviveObjectResponse) SetSignature(sig *Signature) { + x.Signature = sig +} From 26563d4a3d0773c6d53c76e3dc04b1b225fba4ef Mon Sep 17 00:00:00 2001 From: Andrey Butusov Date: Tue, 15 Oct 2024 12:53:21 +0300 Subject: [PATCH 3/3] neofs-cli/control: add `object revive` control command Support command that revive object by purging all removal marks from all metabases. ``` $ neofs-cli control object status --endpoint s04.neofs.devenv:8081 -w services/storage/wallet04.json --object 4yYJV2AyHaJ3fpVimEihAj6NTkwmanbwE7YatJUWBPyM/CYUeRyjfiNXhBMW9XZmdSBJNVLXYBH3gSNQASWTGZX8t Enter password > Shard ID: 2wEzFvWsao9yBiDWKjSBfF metabase: AVAILABLE peapod: path: "/storage/peapod1.db" $ neofs-cli object delete -r s04.neofs.devenv:8080 -w services/storage/wallet04 .json --cid 4yYJV2AyHaJ3fpVimEihAj6NTkwmanbwE7YatJUWBPyM --oid CYUeRyjfiNXhBMW9XZmdSBJNVLXYBH3gSNQASWTGZX8t Enter password > Object CYUeRyjfiNXhBMW9XZmdSBJNVLXYBH3gSNQASWTGZX8t removed successfully. ID: C2LrMExCF3FTfQaFYYZfoDGLpsUVLUy156pUpWh72YeN CID: 4yYJV2AyHaJ3fpVimEihAj6NTkwmanbwE7YatJUWBPyM $ neofs-cli control object status --endpoint s04.neofs.devenv:8081 -w services/storage/wallet04.json --object 4yYJV2AyHaJ3fpVimEihAj6NTkwmanbwE7YatJUWBPyM/CYUeRyjfiNXhBMW9XZmdSBJNVLXYBH3gSNQASWTGZX8t Enter password > Shard ID: 2wEzFvWsao9yBiDWKjSBfF metabase: AVAILABLE,IN GRAVEYARD peapod: path: "/storage/peapod1.db" $ neofs-cli control object revive --endpoint s04.neofs.devenv:8081 -w services/storage/wallet04.json --object 4yYJV2AyHaJ3fpVimEihAj6NTkwmanbwE7YatJUWBPyM/CYUeRyjfiNXhBMW9XZmdSBJNVLXYBH3gSNQASWTGZX8t Enter password > Shard ID: Vuy2Q8QaPZSuUxDycPxSBC Revival status: don't revive, err: logical error: object neither in the graveyard nor was marked with GC mark Shard ID: 2wEzFvWsao9yBiDWKjSBfF Revival status: successful revival from graveyard, tomb: 4yYJV2AyHaJ3fpVimEihAj6NTkwmanbwE7YatJUWBPyM/C2LrMExCF3FTfQaFYYZfoDGLpsUVLUy156pUpWh72YeN $ neofs-cli control object status --endpoint s04.neofs.devenv:8081 -w services/storage/wallet04.json --object 4yYJV2AyHaJ3fpVimEihAj6NTkwmanbwE7YatJUWBPyM/CYUeRyjfiNXhBMW9XZmdSBJNVLXYBH3gSNQASWTGZX8t Enter password > Shard ID: 2wEzFvWsao9yBiDWKjSBfF metabase: AVAILABLE peapod: path: "/storage/peapod1.db" ``` Closes #1450. Signed-off-by: Andrey Butusov --- CHANGELOG.md | 1 + cmd/neofs-cli/modules/control/object.go | 4 + .../modules/control/object_revive.go | 82 +++++++++++++++++++ .../modules/control/object_status.go | 2 - 4 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 cmd/neofs-cli/modules/control/object_revive.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 071cca2620..c1cab338cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ attribute, which is used for container domain name in NNS contracts (#2954) - Save last epoch when metabase was resynchronized (#2966) - `neofs-lens meta last-resync-epoch` command (#2966) - `neofs-lens fstree cleanup-tmp` command (#2967) +- `neofs-cli control object revive` command (#2968) ### Fixed - Do not search for tombstones when handling their expiration, use local indexes instead (#2929) diff --git a/cmd/neofs-cli/modules/control/object.go b/cmd/neofs-cli/modules/control/object.go index 831a477a7f..dcb05dc934 100644 --- a/cmd/neofs-cli/modules/control/object.go +++ b/cmd/neofs-cli/modules/control/object.go @@ -4,6 +4,8 @@ import ( "github.com/spf13/cobra" ) +const objectFlag = "object" + var objectCmd = &cobra.Command{ Use: "object", Short: "Direct object operations with storage engine", @@ -12,7 +14,9 @@ var objectCmd = &cobra.Command{ func initControlObjectsCmd() { objectCmd.AddCommand(listObjectsCmd) objectCmd.AddCommand(objectStatusCmd) + objectCmd.AddCommand(reviveObjectCmd) + initControlObjectReviveCmd() initControlObjectsListCmd() initObjectStatusFlags() } diff --git a/cmd/neofs-cli/modules/control/object_revive.go b/cmd/neofs-cli/modules/control/object_revive.go new file mode 100644 index 0000000000..6926c94833 --- /dev/null +++ b/cmd/neofs-cli/modules/control/object_revive.go @@ -0,0 +1,82 @@ +package control + +import ( + "fmt" + + rawclient "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" + "github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/commonflags" + "github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/key" + "github.com/nspcc-dev/neofs-node/pkg/services/control" + "github.com/spf13/cobra" +) + +var reviveObjectCmd = &cobra.Command{ + Use: "revive", + Short: "Forcefully revive object", + Long: "Purge removal marks from metabases", + Args: cobra.NoArgs, + RunE: reviveObject, +} + +func initControlObjectReviveCmd() { + initControlFlags(reviveObjectCmd) + + flags := reviveObjectCmd.Flags() + flags.String(objectFlag, "", "Object address") +} + +func reviveObject(cmd *cobra.Command, _ []string) error { + ctx, cancel := commonflags.GetCommandContext(cmd) + defer cancel() + + pk, err := key.Get(cmd) + if err != nil { + return err + } + addressRaw, err := cmd.Flags().GetString(objectFlag) + if err != nil { + return fmt.Errorf("reading %s flag: %w", objectFlag, err) + } + + var resp *control.ReviveObjectResponse + req := &control.ReviveObjectRequest{ + Body: &control.ReviveObjectRequest_Body{ + ObjectAddress: []byte(addressRaw), + }, + } + err = signRequest(pk, req) + if err != nil { + return err + } + + cli, err := getClient(ctx) + if err != nil { + return err + } + + err = cli.ExecRaw(func(client *rawclient.Client) error { + resp, err = control.ReviveObject(client, req) + return err + }) + if err != nil { + return fmt.Errorf("rpc error: %w", err) + } + + err = verifyResponse(resp.GetSignature(), resp.GetBody()) + if err != nil { + return err + } + + shards := resp.GetBody().GetShards() + if len(shards) == 0 { + cmd.Println("") + return nil + } + + for _, shard := range shards { + cmd.Printf("Shard ID: %s\n", shard.ShardId) + cmd.Printf("Revival status: %s\n", shard.Status) + } + + return nil +} diff --git a/cmd/neofs-cli/modules/control/object_status.go b/cmd/neofs-cli/modules/control/object_status.go index 5eed21e866..6d976c9d94 100644 --- a/cmd/neofs-cli/modules/control/object_status.go +++ b/cmd/neofs-cli/modules/control/object_status.go @@ -11,8 +11,6 @@ import ( "github.com/spf13/cobra" ) -const objectFlag = "object" - var objectStatusCmd = &cobra.Command{ Use: "status", Short: "Check current object status",