forked from TrueCloudLab/frostfs-node
[#44] services/object: Refactor for minor optimization
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3692032e30
commit
6f4b477195
3 changed files with 3 additions and 3 deletions
|
@ -63,7 +63,7 @@ func (h *distributedHeader) prepare(ctx context.Context, prm *Prm) error {
|
||||||
|
|
||||||
if prm.local {
|
if prm.local {
|
||||||
// use local-only placement builder
|
// use local-only placement builder
|
||||||
builder = util.NewLocalPlacement(placement.NewNetworkMapBuilder(nm), h.localAddrSrc)
|
builder = util.NewLocalPlacement(builder, h.localAddrSrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
// set placement builder
|
// set placement builder
|
||||||
|
|
|
@ -108,7 +108,7 @@ func (p *Streamer) preparePrm(prm *PutInitPrm) error {
|
||||||
prm.traverseOpts = append(prm.traverseOpts, placement.SuccessAfter(1))
|
prm.traverseOpts = append(prm.traverseOpts, placement.SuccessAfter(1))
|
||||||
|
|
||||||
// use local-only placement builder
|
// use local-only placement builder
|
||||||
builder = util.NewLocalPlacement(placement.NewNetworkMapBuilder(nm), p.localAddrSrc)
|
builder = util.NewLocalPlacement(builder, p.localAddrSrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
// set placement builder
|
// set placement builder
|
||||||
|
|
|
@ -113,7 +113,7 @@ func (p *Streamer) preparePrm(prm *Prm) error {
|
||||||
traverseOpts = append(traverseOpts, placement.SuccessAfter(1))
|
traverseOpts = append(traverseOpts, placement.SuccessAfter(1))
|
||||||
|
|
||||||
// use local-only placement builder
|
// use local-only placement builder
|
||||||
builder = util.NewLocalPlacement(placement.NewNetworkMapBuilder(nm), p.localAddrSrc)
|
builder = util.NewLocalPlacement(builder, p.localAddrSrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
// set placement builder
|
// set placement builder
|
||||||
|
|
Loading…
Reference in a new issue