mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Update hourly tier-stats only on succesful tiering (#14330)
This commit is contained in:
parent
b88c57ba93
commit
cdab4a3b85
@ -221,17 +221,18 @@ func (t *transitionState) worker(ctx context.Context, objectAPI ObjectLayer) {
|
|||||||
var err error
|
var err error
|
||||||
if tier, err = transitionObject(ctx, objectAPI, oi); err != nil {
|
if tier, err = transitionObject(ctx, objectAPI, oi); err != nil {
|
||||||
logger.LogIf(ctx, fmt.Errorf("Transition failed for %s/%s version:%s with %w", oi.Bucket, oi.Name, oi.VersionID, err))
|
logger.LogIf(ctx, fmt.Errorf("Transition failed for %s/%s version:%s with %w", oi.Bucket, oi.Name, oi.VersionID, err))
|
||||||
|
} else {
|
||||||
|
ts := tierStats{
|
||||||
|
TotalSize: uint64(oi.Size),
|
||||||
|
NumVersions: 1,
|
||||||
|
}
|
||||||
|
if oi.IsLatest {
|
||||||
|
ts.NumObjects = 1
|
||||||
|
}
|
||||||
|
t.addLastDayStats(tier, ts)
|
||||||
}
|
}
|
||||||
atomic.AddInt32(&t.activeTasks, -1)
|
atomic.AddInt32(&t.activeTasks, -1)
|
||||||
|
|
||||||
ts := tierStats{
|
|
||||||
TotalSize: uint64(oi.Size),
|
|
||||||
NumVersions: 1,
|
|
||||||
}
|
|
||||||
if oi.IsLatest {
|
|
||||||
ts.NumObjects = 1
|
|
||||||
}
|
|
||||||
t.addLastDayStats(tier, ts)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user