Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-25 15:10:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-25 15:10:36 +0300
commitf471d836199c3e35a80769a6daa5c4b6a52be8d7 (patch)
tree91f83fdf9b37eb49fa4baffa88b95867cd6233e7 /workhorse/internal/upload/destination
parent919f0e86ba5997120d02601e648543d1682e8260 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse/internal/upload/destination')
-rw-r--r--workhorse/internal/upload/destination/objectstore/gocloud_object.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/workhorse/internal/upload/destination/objectstore/gocloud_object.go b/workhorse/internal/upload/destination/objectstore/gocloud_object.go
index 38545086994..2c7282e8e96 100644
--- a/workhorse/internal/upload/destination/objectstore/gocloud_object.go
+++ b/workhorse/internal/upload/destination/objectstore/gocloud_object.go
@@ -42,10 +42,15 @@ func NewGoCloudObject(p *GoCloudObjectParams) (*GoCloudObject, error) {
return o, nil
}
+const ChunkSize = 5 * 1024 * 1024
+
func (o *GoCloudObject) Upload(ctx context.Context, r io.Reader) error {
defer o.bucket.Close()
- writer, err := o.bucket.NewWriter(ctx, o.objectName, nil)
+ writerOptions := &blob.WriterOptions{
+ BufferSize: ChunkSize,
+ }
+ writer, err := o.bucket.NewWriter(ctx, o.objectName, writerOptions)
if err != nil {
log.ContextLogger(ctx).WithError(err).Error("error creating GoCloud bucket")
return err