forked from TrueCloudLab/frostfs-node
[#235] engine: Return OutOfBounds error
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
173d34a8a2
commit
41b9fa5b45
1 changed files with 3 additions and 0 deletions
|
@ -57,6 +57,8 @@ func (r *RngRes) Object() *object.Object {
|
||||||
// did not allow to completely read the object part.
|
// did not allow to completely read the object part.
|
||||||
//
|
//
|
||||||
// Returns ErrNotFound if requested object is missing in local storage.
|
// Returns ErrNotFound if requested object is missing in local storage.
|
||||||
|
// Returns ErrAlreadyRemoved if requested object is inhumed.
|
||||||
|
// Returns ErrRangeOutOfBounds if requested object range is out of bounds.
|
||||||
func (e *StorageEngine) GetRange(prm *RngPrm) (*RngRes, error) {
|
func (e *StorageEngine) GetRange(prm *RngPrm) (*RngRes, error) {
|
||||||
var (
|
var (
|
||||||
obj *object.Object
|
obj *object.Object
|
||||||
|
@ -77,6 +79,7 @@ func (e *StorageEngine) GetRange(prm *RngPrm) (*RngRes, error) {
|
||||||
return false // ignore, go to next shard
|
return false // ignore, go to next shard
|
||||||
case
|
case
|
||||||
errors.Is(err, object.ErrAlreadyRemoved),
|
errors.Is(err, object.ErrAlreadyRemoved),
|
||||||
|
errors.Is(err, object.ErrRangeOutOfBounds),
|
||||||
errors.As(err, &siErr):
|
errors.As(err, &siErr):
|
||||||
outError = err
|
outError = err
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue