mirror of
https://github.com/minio/minio.git
synced 2025-02-26 12:59:17 -05:00
Remove empty replication stats (#19385)
When sending final stats upstream also trim empty ReplicationStats.
This commit is contained in:
parent
72c7845f7e
commit
3d6194e93c
@ -543,9 +543,13 @@ func (er erasureObjects) nsScanner(ctx context.Context, buckets []BucketInfo, wa
|
|||||||
}
|
}
|
||||||
|
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
// Flatten for upstream, but save full state.
|
||||||
var root dataUsageEntry
|
var root dataUsageEntry
|
||||||
if r := cache.root(); r != nil {
|
if r := cache.root(); r != nil {
|
||||||
root = cache.flatten(*r)
|
root = cache.flatten(*r)
|
||||||
|
if root.ReplicationStats.empty() {
|
||||||
|
root.ReplicationStats = nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user