mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Persist in-memory replication stats to disk (#15594)
to avoid relying on scanner-calculated replication metrics. This will improve the accuracy of the replication stats reported. This PR also adds on to #15556 by handing replication traffic that could not be queued by available workers to the MRF queue so that entries in `PENDING` status are healed faster.
This commit is contained in:
@@ -569,14 +569,17 @@ func (sys *NotificationSys) GetClusterAllBucketStats(ctx context.Context) []Buck
|
||||
}
|
||||
|
||||
replicationStatsList := globalReplicationStats.GetAll()
|
||||
bucketStatsMap := make(map[string]BucketStats, len(replicationStatsList))
|
||||
bucketStatsMap := BucketStatsMap{
|
||||
Stats: make(map[string]BucketStats, len(replicationStatsList)),
|
||||
Timestamp: UTCNow(),
|
||||
}
|
||||
for k, replicationStats := range replicationStatsList {
|
||||
bucketStatsMap[k] = BucketStats{
|
||||
bucketStatsMap.Stats[k] = BucketStats{
|
||||
ReplicationStats: replicationStats,
|
||||
}
|
||||
}
|
||||
|
||||
replicationStats = append(replicationStats, BucketStatsMap(bucketStatsMap))
|
||||
replicationStats = append(replicationStats, bucketStatsMap)
|
||||
return replicationStats
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user