Correct to remove null version while ILM rule application (#16971)

Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
Co-authored-by: Harshavardhana <harsha@minio.io>
This commit is contained in:
Shubhendu
2023-04-07 02:40:01 +05:30
committed by GitHub
parent 8fd6be0827
commit 4c204707fd
2 changed files with 33 additions and 25 deletions

View File

@@ -514,7 +514,7 @@ func (s *xlStorage) NSScanner(ctx context.Context, cache dataUsageCache, updates
}
done := globalScannerMetrics.time(scannerMetricApplyAll)
fivs.Versions, err = item.applyVersionActions(ctx, objAPI, fivs.Versions)
objInfos, err := item.applyVersionActions(ctx, objAPI, fivs.Versions)
done()
if err != nil {
@@ -524,8 +524,7 @@ func (s *xlStorage) NSScanner(ctx context.Context, cache dataUsageCache, updates
versioned := vcfg != nil && vcfg.Versioned(item.objectPath())
for _, version := range fivs.Versions {
oi := version.ToObjectInfo(item.bucket, item.objectPath(), versioned)
for _, oi := range objInfos {
done = globalScannerMetrics.time(scannerMetricApplyVersion)
sz := item.applyActions(ctx, objAPI, oi, &sizeS)
done()