[#796] policer: Fix tombstone objects replication

Tombstone objects must be replicated to all container nodes.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-11-09 13:33:03 +03:00
parent 02450a9a16
commit 0dc7013844

View file

@ -92,10 +92,10 @@ func (p *Policer) processNodes(ctx context.Context, requirements *placementRequi
// Number of copies that are stored on maintenance nodes.
var uncheckedCopies int
if typ == objectSDK.TypeLock {
// all nodes of a container must store the `LOCK` objects
if typ == objectSDK.TypeLock || typ == objectSDK.TypeTombstone {
// all nodes of a container must store the `LOCK` and `TOMBSTONE` objects
// for correct object removal protection:
// - `LOCK` objects are broadcast on their PUT requests;
// - `LOCK` and `TOMBSTONE` objects are broadcast on their PUT requests;
// - `LOCK` object removal is a prohibited action in the GC.
shortage = uint32(len(nodes))
}