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?
This commit is contained in:
Klaus Post 2020-08-17 08:25:44 -07:00 committed by GitHub
parent 670724184c
commit bb5976d727
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -876,9 +876,9 @@ func (h *healSequence) healBucket(bucket string, bucketsOnly bool) error {
if h.object != "" {
// Check if an object named as the objPrefix exists,
// 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 = h.healObject(bucket, h.object, ""); err != nil {
if err = h.healObject(bucket, h.object, oi.VersionID); err != nil {
return err
}
}