Skip to content

Commit

Permalink
replication: fixed typo in transfer stats (#1861)
Browse files Browse the repository at this point in the history
  • Loading branch information
poornas authored Jul 22, 2023
1 parent 8c81599 commit c0ea248
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/replication/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ func (q ReplQueueStats) QStats() (r ReplQStats) {
for _, node := range q.Nodes {
r.Workers += int64(node.ActiveWorkers)
for arn := range node.TgtXferStats {
xmap, ok := r.TgtXferStats[arn]
xmap, ok := node.TgtXferStats[arn]
if !ok {
xmap = make(map[MetricName]XferStats)
}
Expand All @@ -843,6 +843,9 @@ func (q ReplQueueStats) QStats() (r ReplQStats) {
st.AvgRate += v.AvgRate
st.CurrRate += v.CurrRate
st.PeakRate = math.Max(st.PeakRate, v.PeakRate)
if _, ok := r.TgtXferStats[arn]; !ok {
r.TgtXferStats[arn] = make(map[MetricName]XferStats)
}
r.TgtXferStats[arn][m] = st
}
}
Expand Down

0 comments on commit c0ea248

Please sign in to comment.