fix: track object and bucket for exipreAll (#21241)

This commit is contained in:
jiuker 2025-04-28 12:19:38 +08:00 committed by GitHub
parent 0e017ab071
commit 30a1261c22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -997,7 +997,16 @@ func (ri *batchJobInfo) updateAfter(ctx context.Context, api ObjectLayer, durati
// a single action. e.g batch-expire has an option to expire all versions of an // a single action. e.g batch-expire has an option to expire all versions of an
// object which matches the given filters. // object which matches the given filters.
func (ri *batchJobInfo) trackMultipleObjectVersions(info expireObjInfo, success bool) { func (ri *batchJobInfo) trackMultipleObjectVersions(info expireObjInfo, success bool) {
if ri == nil {
return
}
ri.mu.Lock()
defer ri.mu.Unlock()
if success { if success {
ri.Bucket = info.Bucket
ri.Object = info.Name
ri.Objects += int64(info.NumVersions) - info.DeleteMarkerCount ri.Objects += int64(info.NumVersions) - info.DeleteMarkerCount
ri.DeleteMarkers += info.DeleteMarkerCount ri.DeleteMarkers += info.DeleteMarkerCount
} else { } else {