healbucket: Send object version ID (#10263)

Based on our previous conversations I assume we should send the version
 id when healing an object.

Maybe we should even list object versions and heal all?
master
Klaus Post 4 years ago committed by GitHub
parent 670724184c
commit bb5976d727
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/admin-heal-ops.go

@ -876,9 +876,9 @@ func (h *healSequence) healBucket(bucket string, bucketsOnly bool) error {
if h.object != "" { if h.object != "" {
// Check if an object named as the objPrefix exists, // Check if an object named as the objPrefix exists,
// and if so heal it. // and if so heal it.
_, err := objectAPI.GetObjectInfo(h.ctx, bucket, h.object, ObjectOptions{}) oi, err := objectAPI.GetObjectInfo(h.ctx, bucket, h.object, ObjectOptions{})
if err == nil { if err == nil {
if err = h.healObject(bucket, h.object, ""); err != nil { if err = h.healObject(bucket, h.object, oi.VersionID); err != nil {
return err return err
} }
} }

Loading…
Cancel
Save