[#31] placement: Fix confused selectors and replicas
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f7c685f682
commit
73ee5105ff
2 changed files with 31 additions and 31 deletions
|
@ -77,14 +77,14 @@ func NewTraverser(opts ...Option) (*Traverser, error) {
|
|||
return nil, errors.Wrap(err, "could not build placement")
|
||||
}
|
||||
|
||||
ss := cfg.policy.GetSelectors()
|
||||
rem := make([]int, 0, len(ss))
|
||||
rs := cfg.policy.GetReplicas()
|
||||
rem := make([]int, 0, len(rs))
|
||||
|
||||
for i := range ss {
|
||||
for i := range rs {
|
||||
cnt := cfg.rem
|
||||
|
||||
if cnt == 0 {
|
||||
cnt = int(ss[i].GetCount())
|
||||
cnt = int(rs[i].GetCount())
|
||||
}
|
||||
|
||||
rem = append(rem, cnt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue