mirror of
https://github.com/distribution/distribution.git
synced 2025-09-05 17:01:06 +00:00
Merge pull request #2038 from spacexnice/master
fix: oss driver would get connection reset by peer when upload large image layer.
This commit is contained in:
8
vendor/github.com/denverdino/aliyungo/oss/client.go
generated
vendored
8
vendor/github.com/denverdino/aliyungo/oss/client.go
generated
vendored
@@ -1313,7 +1313,7 @@ func (b *Bucket) CopyLargeFile(sourcePath string, destPath string, contentType s
|
||||
}
|
||||
|
||||
const defaultChunkSize = int64(128 * 1024 * 1024) //128MB
|
||||
const maxCopytSize = int64(1024 * 1024 * 1024) //1G
|
||||
const maxCopytSize = int64(128 * 1024 * 1024) //128MB
|
||||
|
||||
// Copy large file in the same bucket
|
||||
func (b *Bucket) CopyLargeFileInParallel(sourcePath string, destPath string, contentType string, perm ACL, options Options, maxConcurrency int) error {
|
||||
@@ -1322,10 +1322,10 @@ func (b *Bucket) CopyLargeFileInParallel(sourcePath string, destPath string, con
|
||||
maxConcurrency = 1
|
||||
}
|
||||
|
||||
log.Printf("Copy large file from %s to %s\n", sourcePath, destPath)
|
||||
|
||||
currentLength, err := b.GetContentLength(sourcePath)
|
||||
|
||||
|
||||
log.Printf("Parallel Copy large file[size: %d] from %s to %s\n",currentLength, sourcePath, destPath)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user