14388: Fix typo.
authorTom Clegg <tclegg@veritasgenetics.com>
Tue, 23 Oct 2018 18:28:39 +0000 (14:28 -0400)
committerTom Clegg <tclegg@veritasgenetics.com>
Tue, 23 Oct 2018 18:28:39 +0000 (14:28 -0400)
Condition (si.want != si.want) should have been (si.want != sj.want).

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>

services/keep-balance/balance.go

index 8a06b902fc95579bc0f59f88a29e77c1c57665b9..6bfd17573709b82adb7231b81dfdd340a599914c 100644 (file)
@@ -568,14 +568,14 @@ func (bal *Balancer) balanceBlock(blkid arvados.SizedDigest, blk *BlockState) ba
                                // Prefer a mount that satisfies the
                                // desired class.
                                return bal.mountsByClass[class][si.mnt]
-                       } else if wanti, wantj := si.want, si.want; wanti != wantj {
+                       } else if si.want != sj.want {
                                // Prefer a mount that will have a
                                // replica no matter what we do here
                                // -- either because it already has an
                                // untrashable replica, or because we
                                // already need it to satisfy a
                                // different storage class.
-                               return slots[i].want
+                               return si.want
                        } else if orderi, orderj := srvRendezvous[si.mnt.KeepService], srvRendezvous[sj.mnt.KeepService]; orderi != orderj {
                                // Prefer a better rendezvous
                                // position.