fix: make sure to use existing object location

This commit is contained in:
Harshavardhana 2021-05-05 10:44:48 -07:00
parent 6399e5e589
commit 5c0d3ef283

View file

@ -1495,10 +1495,9 @@ func (z *erasureServerSets) NewMultipartUpload(ctx context.Context, bucket, obje
}
}
// We multiply the size by 2 to account for erasure coding.
idx := z.getAvailableZoneIdx(ctx, (1<<30)*2)
if idx < 0 {
return "", toObjectErr(errDiskFull)
idx, err := z.getZoneIdx(ctx, bucket, object, ObjectOptions{}, 1<<30)
if err != nil {
return "", err
}
return z.serverSets[idx].NewMultipartUpload(ctx, bucket, object, opts)