forked from TrueCloudLab/frostfs-node
[#1699] meta: Do not return SplitInfoError on Delete
It is not an error: removing virtual object is expected and should be just skipped. Getting a virtual object with `raw` flag is considered as an impossible action, all the virtual objects removals will be handled via their children's removals implicitly. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
a3e7365cbd
commit
2849e465f9
3 changed files with 7 additions and 3 deletions
|
@ -157,7 +157,10 @@ func (db *DB) delete(tx *bbolt.Tx, addr oid.Address, refCounter referenceCounter
|
|||
// unmarshal object, work only with physically stored (raw == true) objects
|
||||
obj, err := db.get(tx, addr, key, false, true, currEpoch)
|
||||
if err != nil {
|
||||
if errors.As(err, new(apistatus.ObjectNotFound)) {
|
||||
var siErr *objectSDK.SplitInfoError
|
||||
var notFoundErr apistatus.ObjectNotFound
|
||||
|
||||
if errors.As(err, ¬FoundErr) || errors.As(err, &siErr) {
|
||||
return false, false, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue