[#1175] object/put: Perform additional container broadcast of LOCKs

`LOCK` objects should be broadcast across container like `TOMBSTONE`
ones.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
remotes/fyrchik/fix-lock
Leonard Lyubich 2022-03-05 16:27:43 +03:00 committed by LeL
parent 323dea95c6
commit ebd84f6dd4
1 changed files with 3 additions and 2 deletions

View File

@ -162,8 +162,9 @@ func (p *Streamer) newCommonTarget(prm *PutInitPrm) transformer.ObjectTarget {
}
// enable additional container broadcast on non-local operation
// if object has TOMBSTONE type.
withBroadcast := !prm.common.LocalOnly() && prm.hdr.Type() == object.TypeTombstone
// if object has TOMBSTONE or LOCK type.
typ := prm.hdr.Type()
withBroadcast := !prm.common.LocalOnly() && (typ == object.TypeTombstone || typ == object.TypeLock)
return &distributedTarget{
traversal: traversal{