From 62b8784428d765d9356c07d60f7ca81920c299f1 Mon Sep 17 00:00:00 2001 From: Feng Ruohang Date: Wed, 11 Nov 2026 11:40:24 +0800 Subject: [PATCH] fix: satisfy integrated server verifiers Signed-off-by: Feng Ruohang --- cmd/auth-handler.go | 10 ---------- cmd/erasure-server-pool-decom.go | 4 ++-- cmd/object-lock-reconciliation_test.go | 2 ++ 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/cmd/auth-handler.go b/cmd/auth-handler.go index e4d408444..b9af9bc53 100644 --- a/cmd/auth-handler.go +++ b/cmd/auth-handler.go @@ -340,16 +340,6 @@ func checkRequestAuthType(ctx context.Context, r *http.Request, action policy.Ac return s3Err } -func checkRequestAuthTypeWithExistingTags(ctx context.Context, r *http.Request, action policy.Action, bucketName, objectName, existingTags string) (s3Err APIErrorCode) { - logger.GetReqInfo(ctx).BucketName = bucketName - logger.GetReqInfo(ctx).ObjectName = objectName - - if s3Err = authenticateRequest(ctx, r, action); s3Err != ErrNone { - return s3Err - } - return authorizeRequestWithExistingTags(ctx, r, action, existingTags) -} - func checkRequestAuthTypeWithRequestTags(ctx context.Context, r *http.Request, action policy.Action, bucketName, objectName string, requestTags *string) (s3Err APIErrorCode) { logger.GetReqInfo(ctx).BucketName = bucketName logger.GetReqInfo(ctx).ObjectName = objectName diff --git a/cmd/erasure-server-pool-decom.go b/cmd/erasure-server-pool-decom.go index 6d4155002..b1a9e369f 100644 --- a/cmd/erasure-server-pool-decom.go +++ b/cmd/erasure-server-pool-decom.go @@ -1059,12 +1059,12 @@ func (z *erasureServerPools) decommissionPoolWalk(ctx context.Context, idx int, // One metadata-only read of each source drive per entry, regardless // of its version count. No read error can become progress or trigger // another walk; leave the bucket queued for an explicit retry. - snapshot := append(fivs.Versions, fivs.FreeVersions...) + snapshot := slices.Concat(fivs.Versions, fivs.FreeVersions) n, countErr := z.countAbsentMigrationVersions(ctx, bi.Name, entry.name, idx, snapshot) removed.Add(int64(n)) // The disposable usage cache is also excluded by the final // verification. Its unreadability still never counts as progress. - if countErr != nil && !(bi.Name == minioMetaBucket && strings.Contains(entry.name, dataUsageCacheName)) { + if countErr != nil && (bi.Name != minioMetaBucket || !strings.Contains(entry.name, dataUsageCacheName)) { verifyOnce.Do(func() { verifyErr = countErr }) if err == nil { err = countErr diff --git a/cmd/object-lock-reconciliation_test.go b/cmd/object-lock-reconciliation_test.go index 1624f7021..1dd5e0a4c 100644 --- a/cmd/object-lock-reconciliation_test.go +++ b/cmd/object-lock-reconciliation_test.go @@ -327,12 +327,14 @@ func (f *lockBoundaryReadFailure) GetObjectNInfo(ctx context.Context, bucket, ke } return f.ObjectLayer.GetObjectNInfo(ctx, bucket, key, rs, h, opts) } + func (f *lockBoundaryReadFailure) GetObjectInfo(ctx context.Context, bucket, key string, opts ObjectOptions) (ObjectInfo, error) { if f.destinationError != nil && bucket == f.bucket && key == f.key && opts.VersionID == f.version { return ObjectInfo{}, f.destinationError } return f.ObjectLayer.GetObjectInfo(ctx, bucket, key, opts) } + func (f *lockBoundaryReadFailure) DeleteObject(ctx context.Context, bucket, key string, opts ObjectOptions) (ObjectInfo, error) { f.deleteCalls++ return f.ObjectLayer.DeleteObject(ctx, bucket, key, opts)