Skip to content

Commit

Permalink
use constants
Browse files Browse the repository at this point in the history
Signed-off-by: Renan Rangel <[email protected]>
  • Loading branch information
rvrangel committed Dec 13, 2024
1 parent 6a7a622 commit 4ab78e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/vt/mysqlctl/s3backupstorage/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func calculateUploadPartSize(filesize int64) (partSizeBytes int64, err error) {
}

if minPartSize != 0 && partSizeBytes < minPartSize {
if minPartSize > 1024*1024*1024*5 || minPartSize < 1024*1024*5 { // 5GiB and 5MiB respectively
if minPartSize > MaxPartSize || minPartSize < manager.MinUploadPartSize { // 5GiB and 5MiB respectively
return 0, fmt.Errorf("%w, currently set to %s",
ErrPartSize, humanize.IBytes(uint64(minPartSize)),
)
Expand Down

0 comments on commit 4ab78e0

Please sign in to comment.