[#1450] engine: Return shard-level error if object is expired on inhume
Since we have errors defined on the shard-level, it looks strage that we check an error againt the shard-level error `ErrLockObjectRemoval`, but then return the metabase-level error. Let's return the same shard-level error instead. Since we have errors defined on the shard-level Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
parent
47dfd8840c
commit
748edd1999
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ func (e *StorageEngine) inhumeAddr(ctx context.Context, addr oid.Address, prm sh
|
|||
retErr = new(apistatus.ObjectLocked)
|
||||
return true
|
||||
case errors.Is(err, shard.ErrLockObjectRemoval):
|
||||
retErr = meta.ErrLockObjectRemoval
|
||||
retErr = shard.ErrLockObjectRemoval
|
||||
return true
|
||||
case errors.Is(err, shard.ErrReadOnlyMode) || errors.Is(err, shard.ErrDegradedMode):
|
||||
retErr = err
|
||||
|
|
Loading…
Reference in a new issue