forked from TrueCloudLab/frostfs-node
[#222] Return nil in metabase.IsSmall
if object is big
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
862f9a3f1a
commit
ce92df3543
1 changed files with 4 additions and 2 deletions
|
@ -27,7 +27,9 @@ func (db *DB) isSmall(tx *bbolt.Tx, addr *objectSDK.Address) (*blobovnicza.ID, e
|
|||
}
|
||||
|
||||
blobovniczaID := smallBucket.Get(objectKey(addr.ObjectID()))
|
||||
id := blobovnicza.NewIDFromBytes(blobovniczaID)
|
||||
|
||||
return id, nil
|
||||
if len(blobovniczaID) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return blobovnicza.NewIDFromBytes(blobovniczaID), nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue