forked from TrueCloudLab/frostfs-node
[#2068] blobstor: Allow to provide storage ID in Exists
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
6ad2b5d5b8
commit
63f604e948
5 changed files with 101 additions and 4 deletions
|
@ -13,6 +13,13 @@ func (b *BlobStor) Exists(prm common.ExistsPrm) (common.ExistsRes, error) {
|
|||
b.modeMtx.RLock()
|
||||
defer b.modeMtx.RUnlock()
|
||||
|
||||
if prm.StorageID != nil {
|
||||
if len(prm.StorageID) == 0 {
|
||||
return b.storage[len(b.storage)-1].Storage.Exists(prm)
|
||||
}
|
||||
return b.storage[0].Storage.Exists(prm)
|
||||
}
|
||||
|
||||
// If there was an error during existence check below,
|
||||
// it will be returned unless object was found in blobovnicza.
|
||||
// Otherwise, it is logged and the latest error is returned.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue