From 0b515837caf92e000128cd62656c3a2ba7bfd873 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 19 Nov 2020 15:13:42 +0300 Subject: [PATCH] [#186] localstorage: Fix address forwarding in Delete method In previous implementation storage engine not forwarded object address to shards. Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/engine/delete.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/local_object_storage/engine/delete.go b/pkg/local_object_storage/engine/delete.go index 6992bfc61a..8b1aad289a 100644 --- a/pkg/local_object_storage/engine/delete.go +++ b/pkg/local_object_storage/engine/delete.go @@ -30,7 +30,8 @@ func (p *DeletePrm) WithAddress(addr *objectSDK.Address) *DeletePrm { // Returns any error encountered that did not allow to completely // mark the object to delete. func (e *StorageEngine) Delete(prm *DeletePrm) (*DeleteRes, error) { - shPrm := new(shard.DeletePrm) + shPrm := new(shard.DeletePrm). + WithAddress(prm.addr) e.iterateOverSortedShards(prm.addr, func(sh *shard.Shard) (stop bool) { _, err := sh.Delete(shPrm)