forked from TrueCloudLab/frostfs-node
[#236] engine: Stop shard iteration at split info error in GetRange
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
590745204c
commit
c267a08886
1 changed files with 5 additions and 2 deletions
|
@ -59,7 +59,8 @@ func (r *RngRes) Object() *object.Object {
|
|||
// Returns ErrNotFound if requested object is missing in local storage.
|
||||
func (e *StorageEngine) GetRange(prm *RngPrm) (*RngRes, error) {
|
||||
var (
|
||||
obj *object.Object
|
||||
obj *object.Object
|
||||
siErr *objectSDK.SplitInfoError
|
||||
|
||||
outError = object.ErrNotFound
|
||||
)
|
||||
|
@ -74,7 +75,9 @@ func (e *StorageEngine) GetRange(prm *RngPrm) (*RngRes, error) {
|
|||
switch {
|
||||
case errors.Is(err, object.ErrNotFound):
|
||||
return false // ignore, go to next shard
|
||||
case errors.Is(err, object.ErrAlreadyRemoved):
|
||||
case
|
||||
errors.Is(err, object.ErrAlreadyRemoved),
|
||||
errors.As(err, &siErr):
|
||||
outError = err
|
||||
|
||||
return true // stop, return it back
|
||||
|
|
Loading…
Reference in a new issue