diff --git a/pkg/local_object_storage/metabase/lock.go b/pkg/local_object_storage/metabase/lock.go new file mode 100644 index 000000000..5e5df53f4 --- /dev/null +++ b/pkg/local_object_storage/metabase/lock.go @@ -0,0 +1,13 @@ +package meta + +import ( + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" +) + +// suffix for container buckets with locked objects. +const bucketNameSuffixLocked = invalidBase58String + "LOCKED" + +// returns name of the bucket with locked objects for specified container. +func bucketNameLocked(idCnr cid.ID) []byte { + return []byte(idCnr.String() + bucketNameSuffixLocked) +} diff --git a/pkg/local_object_storage/metabase/put.go b/pkg/local_object_storage/metabase/put.go index e12446d53..73360a8c5 100644 --- a/pkg/local_object_storage/metabase/put.go +++ b/pkg/local_object_storage/metabase/put.go @@ -198,6 +198,8 @@ func uniqueIndexes(obj *objectSDK.Object, si *objectSDK.SplitInfo, id *blobovnic bucketName = tombstoneBucketName(addr.ContainerID()) case objectSDK.TypeStorageGroup: bucketName = storageGroupBucketName(addr.ContainerID()) + case objectSDK.TypeLock: + bucketName = bucketNameLocked(*addr.ContainerID()) default: return nil, ErrUnknownObjectType }