forked from TrueCloudLab/frostfs-node
[#1175] metabase: Work with LOCK objects
After introduction of LOCK objects (of type `TypeLock`) complicated extended its behavior: * create `lockers` container bucket (LCB) during PUT; * remove object from LCB during DELETE; * look up object in LCB during EXISTS; * get object from LCB during GET; * list objects from LCB during LIST with cursor; * select objects from LCB during SELECT with '*'. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
9f13674a10
commit
9508633a7e
13 changed files with 97 additions and 18 deletions
|
@ -88,13 +88,8 @@ func (db *DB) exists(tx *bbolt.Tx, addr *addressSDK.Address) (exists bool, err e
|
|||
return false, objectSDK.NewSplitInfoError(splitInfo)
|
||||
}
|
||||
|
||||
// if parent bucket is empty, then check if object exists in tombstone bucket
|
||||
if inBucket(tx, tombstoneBucketName(addr.ContainerID()), objKey) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// if parent bucket is empty, then check if object exists in storage group bucket
|
||||
return inBucket(tx, storageGroupBucketName(addr.ContainerID()), objKey), nil
|
||||
// if parent bucket is empty, then check if object exists in typed buckets
|
||||
return firstIrregularObjectType(tx, *addr.ContainerID(), objKey) != objectSDK.TypeRegular, nil
|
||||
}
|
||||
|
||||
// inGraveyard returns:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue