forked from TrueCloudLab/frostfs-node
[#643] objsvc/put: Unify extraBroadcastEnabled usage
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
facd3b2c4b
commit
c9e3c9956e
3 changed files with 7 additions and 8 deletions
|
@ -130,12 +130,6 @@ func (t *distributedTarget) WriteObject(ctx context.Context, obj *objectSDK.Obje
|
|||
if t.objMeta, err = t.fmtValidator.ValidateContent(t.obj); err != nil {
|
||||
return fmt.Errorf("(%T) could not validate payload content: %w", t, err)
|
||||
}
|
||||
|
||||
if len(t.obj.Children()) > 0 {
|
||||
// enabling extra broadcast for linking objects
|
||||
t.extraBroadcastEnabled = true
|
||||
}
|
||||
|
||||
return t.iteratePlacement(ctx)
|
||||
}
|
||||
|
||||
|
@ -157,6 +151,6 @@ func (t *distributedTarget) iteratePlacement(ctx context.Context) error {
|
|||
id, _ := t.obj.ID()
|
||||
|
||||
iter := t.cfg.newNodeIterator(append(t.placementOpts, placement.ForObject(id)))
|
||||
iter.extraBroadcastEnabled = t.extraBroadcastEnabled
|
||||
iter.extraBroadcastEnabled = needAdditionalBroadcast(t.obj, false /* Distributed target is for cluster-wide PUT */)
|
||||
return iter.forEachNode(ctx, t.sendObject)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue