blockToDesiredReplication map[blockdigest.DigestWithSize]int,
underReplicated BlockSet) (m map[Locator]PullServers) {
m = map[Locator]PullServers{}
- // We use CanonicalString to avoid filling memory with dupicate
+ // We use CanonicalString to avoid filling memory with duplicate
// copies of the same string.
var cs CanonicalString
if arvLogger != nil {
// We need a local variable because Update doesn't call our mutator func until later,
// when our list variable might have been reused by the next loop iteration.
+ host := host
+ listLen := len(list)
arvLogger.Update(func(p map[string]interface{}, e map[string]interface{}) {
pullListInfo := logger.GetOrCreateMap(p, "pull_list_len")
- pullListInfo[host] = len(list)
+ pullListInfo[host] = listLen
})
}