mirror of
https://github.com/pgsty/minio.git
synced 2026-11-11 10:05:34 +03:00
fix: satisfy integrated server verifiers
Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user