1
0
mirror of https://github.com/minio/minio.git synced 2025-03-30 17:23:42 -04:00

tier: Avoid doing versioned operations since not required anymore ()

Currently, setting a new tiering target returns an error when a bucket
is versioned and the tiering credentials does not have authorization to
specify a version-id when reading or removing a specific version;

Since tiering does not require versioning anymore; avoid doing versioned
operations when performing checklist ops while adding a new tiering
configuration.
This commit is contained in:
Anis Eleuch 2023-09-26 00:14:56 -07:00 committed by GitHub
parent 50a8f13e85
commit 22ee678136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,7 +49,7 @@ const probeObject = "probeobject"
// to perform all operations defined in the WarmBackend interface. // to perform all operations defined in the WarmBackend interface.
func checkWarmBackend(ctx context.Context, w WarmBackend) error { func checkWarmBackend(ctx context.Context, w WarmBackend) error {
var empty bytes.Reader var empty bytes.Reader
rv, err := w.Put(ctx, probeObject, &empty, 0) _, err := w.Put(ctx, probeObject, &empty, 0)
if err != nil { if err != nil {
if _, ok := err.(BackendDown); ok { if _, ok := err.(BackendDown); ok {
return err return err
@ -60,7 +60,7 @@ func checkWarmBackend(ctx context.Context, w WarmBackend) error {
} }
} }
r, err := w.Get(ctx, probeObject, rv, WarmBackendGetOpts{}) r, err := w.Get(ctx, probeObject, "", WarmBackendGetOpts{})
xhttp.DrainBody(r) xhttp.DrainBody(r)
if err != nil { if err != nil {
if _, ok := err.(BackendDown); ok { if _, ok := err.(BackendDown); ok {
@ -78,7 +78,7 @@ func checkWarmBackend(ctx context.Context, w WarmBackend) error {
} }
} }
} }
if err = w.Remove(ctx, probeObject, rv); err != nil { if err = w.Remove(ctx, probeObject, ""); err != nil {
if _, ok := err.(BackendDown); ok { if _, ok := err.(BackendDown); ok {
return err return err
} }