mirror of https://github.com/minio/minio.git
tier: Avoid doing versioned operations since not required anymore (#18108)
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:
parent
50a8f13e85
commit
22ee678136
|
@ -49,7 +49,7 @@ const probeObject = "probeobject"
|
|||
// to perform all operations defined in the WarmBackend interface.
|
||||
func checkWarmBackend(ctx context.Context, w WarmBackend) error {
|
||||
var empty bytes.Reader
|
||||
rv, err := w.Put(ctx, probeObject, &empty, 0)
|
||||
_, err := w.Put(ctx, probeObject, &empty, 0)
|
||||
if err != nil {
|
||||
if _, ok := err.(BackendDown); ok {
|
||||
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)
|
||||
if err != nil {
|
||||
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 {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue