forked from TrueCloudLab/frostfs-node
[#1186] engine: Allow to skip metabase in GetRange
Similarly to `Get`. Also fix a bug where `ErrNotFound` is returned instead of `ErrRangeOutOfBounds`. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
2b5550ccf6
commit
1fe9cd4d36
6 changed files with 72 additions and 10 deletions
|
@ -321,12 +321,16 @@ func (b *blobovniczas) getRange(prm *GetRangeSmallPrm) (res *GetRangeSmallRes, e
|
|||
|
||||
res, err = b.getRangeFromLevel(prm, p, !ok)
|
||||
if err != nil {
|
||||
if !errors.Is(err, object.ErrNotFound) {
|
||||
outOfBounds := errors.Is(err, object.ErrRangeOutOfBounds)
|
||||
if !errors.Is(err, object.ErrNotFound) && !outOfBounds {
|
||||
b.log.Debug("could not get object from level",
|
||||
zap.String("level", p),
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
}
|
||||
if outOfBounds {
|
||||
return true, err
|
||||
}
|
||||
}
|
||||
|
||||
activeCache[dirPath] = struct{}{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue