From 4ab78e0cdb04d9a5ea50e1710c5c7d219956f5a3 Mon Sep 17 00:00:00 2001 From: Renan Rangel Date: Fri, 13 Dec 2024 02:41:29 -0800 Subject: [PATCH] use constants Signed-off-by: Renan Rangel --- go/vt/mysqlctl/s3backupstorage/s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/vt/mysqlctl/s3backupstorage/s3.go b/go/vt/mysqlctl/s3backupstorage/s3.go index c759108583b..c3a48fb0c74 100644 --- a/go/vt/mysqlctl/s3backupstorage/s3.go +++ b/go/vt/mysqlctl/s3backupstorage/s3.go @@ -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)), )