14388: Fix log message.
authorTom Clegg <tclegg@veritasgenetics.com>
Tue, 23 Oct 2018 18:25:37 +0000 (14:25 -0400)
committerTom Clegg <tclegg@veritasgenetics.com>
Tue, 23 Oct 2018 18:25:37 +0000 (14:25 -0400)
When a volume with replication=2 has 15 objects, report them as "15
entries / 2x / 30 replicas", rather than "15 replicas", so the numbers
agree with the other logs/stats about replica counts.

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

services/keep-balance/balance.go

index 5f5f9afdc4741d6c8b74fb582f52a706fd5ea9be..8a06b902fc95579bc0f59f88a29e77c1c57665b9 100644 (file)
@@ -308,9 +308,9 @@ func (bal *Balancer) GetCurrentState(c *arvados.Client, pageSize, bufs int) erro
                                return
                        }
                        for _, mount := range mounts {
-                               bal.logf("%s: add %d replicas to map", mount, len(idx))
+                               bal.logf("%s: add %d entries to map", mount, len(idx))
                                bal.BlockStateMap.AddReplicas(mount, idx)
-                               bal.logf("%s: added %d replicas", mount, len(idx))
+                               bal.logf("%s: added %d entries to map at %dx (%d replicas)", mount, len(idx), mount.Replication, len(idx)*mount.Replication)
                        }
                        bal.logf("mount %s: index done", mounts[0])
                }(mounts)