Skip to content

Commit

Permalink
Support writing files larger than 1TB
Browse files Browse the repository at this point in the history
  • Loading branch information
monthonk authored and kahing committed Nov 2, 2022
1 parent f960f45 commit 2b06485
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,14 @@ func (fh *FileHandle) waitForCreateMPU() (err error) {
func (fh *FileHandle) partSize() uint64 {
var size uint64

if fh.lastPartId < 1000 {
if fh.lastPartId < 500 {
size = 5 * 1024 * 1024
} else if fh.lastPartId < 2000 {
} else if fh.lastPartId < 1000 {
size = 25 * 1024 * 1024
} else {
} else if fh.lastPartId < 2000 {
size = 125 * 1024 * 1024
} else {
size = 625 * 1024 * 1024
}

maxPartSize := fh.cloud.Capabilities().MaxMultipartSize
Expand Down

0 comments on commit 2b06485

Please sign in to comment.