fix: partStartTime needs to include reading

This commit is contained in:
Derrick Hammer 2024-02-28 12:16:47 -05:00
parent 5f0e2d2e15
commit a49da3fdfe
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 2 deletions

View File

@ -411,6 +411,7 @@ func (s StorageServiceDefault) S3MultipartUpload(ctx context.Context, data io.Re
}
for partNum := 1; partNum <= totalParts; partNum++ {
partStartTime := time.Now()
partData := make([]byte, partSize)
readSize, err := data.Read(partData)
if err != nil && err != io.EOF {
@ -420,8 +421,6 @@ func (s StorageServiceDefault) S3MultipartUpload(ctx context.Context, data io.Re
if partNum <= int(lastPartNumber) {
continue
}
partStartTime := time.Now()
uploadPartOutput, err := client.UploadPart(ctx, &s3.UploadPartInput{
Bucket: aws.String(bucket),
Key: aws.String(key),