[#789] shard: Exclude object.ErrAlreadyRemoved errors in refillMetabase
Tombstone and "alive" objects can be both stored in BlobStor. They can appear during iterating in different order. Metabase returns `ErrAlreadyRemoved` error if object is inhumed. Ignore `object.ErrAlreadyRemoved` errors of `metabase.Put`in Shard's `refillMetabase` operation. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
d938c7267b
commit
504abdda06
1 changed files with 6 additions and 1 deletions
|
@ -116,7 +116,12 @@ func (s *Shard) refillMetabase() error {
|
|||
}
|
||||
}
|
||||
|
||||
return meta.Put(s.metaBase, obj, blzID)
|
||||
err := meta.Put(s.metaBase, obj, blzID)
|
||||
if err != nil && !errors.Is(err, object.ErrAlreadyRemoved) {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue