shard: Fix delete objects from FSTree #1261

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:fix/delete_without_storage_id into master 2024-07-22 11:56:44 +00:00

View file

@ -117,6 +117,12 @@ func (s *Shard) deleteFromBlobstor(ctx context.Context, addr oid.Address) error
return err
}
storageID := res.StorageID()
if storageID == nil {
// if storageID is nil it means:
// 1. there is no such object

Why is it nil here, when it is an explicit empty slice in Put?

Why is it `nil` here, when it is an explicit empty slice in `Put`?

You are right, fixed.

You are right, fixed.
// 2. object stored by writecache: should not happen, as `validateWritecacheDoesntContainObject` called before `deleteFromBlobstor`
return nil
}
var delPrm common.DeletePrm
delPrm.Address = addr