frostfs-node/pkg/local_object_storage/metabase/lock.go
Leonard Lyubich 14d27455f3 [#1175] metabase: Add container bucket for LOCKs
Create class of container buckets with `LOCKED` suffix. Put identifiers
of the objects of type `LOCK` to these buckets during `DB.Put`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-15 13:03:23 +03:00

13 lines
374 B
Go

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)
}