[#186] localstorage: Fix address forwarding in Delete method

In previous implementation storage engine not forwarded object address to
shards.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-19 15:13:42 +03:00 committed by Alex Vanin
parent 4ca1035aa4
commit 0b515837ca

View file

@ -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)