Skip to content

Commit

Permalink
Merge pull request #335 from amshuman-kr/cherry-pick/PR334-on-rel-v0.12
Browse files Browse the repository at this point in the history
Updated number of chunks while uploading to never exceed the cloud provider limits.
  • Loading branch information
Amshuman K R authored May 26, 2021
2 parents 5c9d1ba + 5b8eace commit 2aecca0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pkg/snapstore/gcs_snapstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ type GCSSnapStore struct {
}

const (
gcsNoOfChunk int64 = 32
// Total number of chunks to be uploaded must be one less than maximum limit allowed.
gcsNoOfChunk int64 = 31
)

// NewGCSSnapStore create new GCSSnapStore from shared configuration with specified bucket.
Expand Down
3 changes: 2 additions & 1 deletion pkg/snapstore/oss_snapstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ type OSSBucket interface {
}

const (
ossNoOfChunk int64 = 10000
// Total number of chunks to be uploaded must be one less than maximum limit allowed.
ossNoOfChunk int64 = 9999
ossEndPoint = "ALICLOUD_ENDPOINT"
accessKeyID = "ALICLOUD_ACCESS_KEY_ID"
accessKeySecret = "ALICLOUD_ACCESS_KEY_SECRET"
Expand Down
3 changes: 2 additions & 1 deletion pkg/snapstore/s3_snapstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ import (
)

const (
s3NoOfChunk int64 = 10000 //Default configuration in swift installation
// Total number of chunks to be uploaded must be one less than maximum limit allowed.
s3NoOfChunk int64 = 9999
)

// S3SnapStore is snapstore with AWS S3 object store as backend
Expand Down
3 changes: 2 additions & 1 deletion pkg/snapstore/swift_snapstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ type SwiftSnapStore struct {
}

const (
swiftNoOfChunk int64 = 1000 //Default configuration in swift installation
// Total number of chunks to be uploaded must be one less than maximum limit allowed.
swiftNoOfChunk int64 = 999 //Default configuration in swift installation
)

// NewSwiftSnapStore create new SwiftSnapStore from shared configuration with specified bucket
Expand Down

0 comments on commit 2aecca0

Please sign in to comment.