[#248] metabase: Remove storage group bucket
Backwards compatible change, so no version increase. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
586f5986bc
commit
a9c4ba62c3
14 changed files with 8 additions and 122 deletions
|
@ -65,10 +65,10 @@ const (
|
|||
// Key: object ID
|
||||
// Value: marshalled object
|
||||
lockersPrefix
|
||||
// storageGroupPrefix is used for prefixing buckets containing objects of STORAGEGROUP type.
|
||||
// _ is unused. Previous usage was for prefixing buckets containing objects of STORAGEGROUP type.
|
||||
// Key: object ID
|
||||
// Value: marshaled object
|
||||
storageGroupPrefix
|
||||
_
|
||||
// tombstonePrefix is used for prefixing buckets containing objects of TOMBSTONE type.
|
||||
// Key: object ID
|
||||
// Value: marshaled object
|
||||
|
@ -138,11 +138,6 @@ func tombstoneBucketName(cnr cid.ID, key []byte) []byte {
|
|||
return bucketName(cnr, tombstonePrefix, key)
|
||||
}
|
||||
|
||||
// storageGroupBucketName returns <CID>_SG.
|
||||
func storageGroupBucketName(cnr cid.ID, key []byte) []byte {
|
||||
return bucketName(cnr, storageGroupPrefix, key)
|
||||
}
|
||||
|
||||
// smallBucketName returns <CID>_small.
|
||||
func smallBucketName(cnr cid.ID, key []byte) []byte {
|
||||
return bucketName(cnr, smallPrefix, key)
|
||||
|
@ -231,15 +226,14 @@ func firstIrregularObjectType(tx *bbolt.Tx, idCnr cid.ID, objs ...[]byte) object
|
|||
panic("empty object list in firstIrregularObjectType")
|
||||
}
|
||||
|
||||
var keys [3][1 + cidSize]byte
|
||||
var keys [2][1 + cidSize]byte
|
||||
|
||||
irregularTypeBuckets := [...]struct {
|
||||
typ object.Type
|
||||
name []byte
|
||||
}{
|
||||
{object.TypeTombstone, tombstoneBucketName(idCnr, keys[0][:])},
|
||||
{object.TypeStorageGroup, storageGroupBucketName(idCnr, keys[1][:])},
|
||||
{object.TypeLock, bucketNameLockers(idCnr, keys[2][:])},
|
||||
{object.TypeLock, bucketNameLockers(idCnr, keys[1][:])},
|
||||
}
|
||||
|
||||
for i := range objs {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue