mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Remove error returned when part sizes are un-equal (#6183)
Since implementing `pwrite` like implementation would require a more complex code than background append implementation, it is better to keep the current code as is and not implement `pwrite` based functionality. Closes #4881
This commit is contained in:
committed by
kannappanr
parent
20480ba3f7
commit
2debe77586
@@ -543,25 +543,11 @@ func (fs *FSObjects) CompleteMultipartUpload(ctx context.Context, bucket string,
|
||||
|
||||
// All parts except the last part has to be atleast 5MB.
|
||||
if !isMinAllowedPartSize(fi.Size()) {
|
||||
err = PartTooSmall{
|
||||
return oi, PartTooSmall{
|
||||
PartNumber: part.PartNumber,
|
||||
PartSize: fi.Size(),
|
||||
PartETag: part.ETag,
|
||||
}
|
||||
logger.LogIf(ctx, err)
|
||||
return oi, err
|
||||
}
|
||||
|
||||
// TODO: Make necessary changes in future as explained in the below comment.
|
||||
// All parts except the last part has to be of same size. We are introducing this
|
||||
// check to see if any clients break. If clients do not break then we can optimize
|
||||
// multipart PutObjectPart by writing the part at the right offset using pwrite()
|
||||
// so that we don't need to do background append at all. i.e by the time we get
|
||||
// CompleteMultipartUpload we already have the full file available which can be
|
||||
// renamed to the main name-space.
|
||||
if partSize != fi.Size() {
|
||||
logger.LogIf(ctx, PartsSizeUnequal{})
|
||||
return oi, PartsSizeUnequal{}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user