optimize double reads by reusing results from checkUploadIDExists() (#15692)

Move to using `xl.meta` data structure to keep temporary partInfo,
this allows for a future change where we move to different parts to
different drives.
This commit is contained in:
Harshavardhana
2022-09-15 12:43:49 -07:00
committed by GitHub
parent 124544d834
commit 9e5853ecc0
4 changed files with 89 additions and 145 deletions
+1 -4
View File
@@ -683,10 +683,7 @@ func (er erasureObjects) getObjectInfoAndQuorum(ctx context.Context, bucket, obj
return objInfo, er.defaultWQuorum(), toObjectErr(err, bucket, object)
}
wquorum = fi.Erasure.DataBlocks
if fi.Erasure.DataBlocks == fi.Erasure.ParityBlocks {
wquorum++
}
wquorum = fi.WriteQuorum(er.defaultWQuorum())
objInfo = fi.ToObjectInfo(bucket, object, opts.Versioned || opts.VersionSuspended)
if !fi.VersionPurgeStatus().Empty() && opts.VersionID != "" {