From 60a0613772aaa6925a599c501e2e84ab5caac7b3 Mon Sep 17 00:00:00 2001 From: Robert Lippens Date: Wed, 14 Aug 2019 00:41:45 -0700 Subject: [PATCH] set upload buffer settings --- store/logs/azureblob.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/store/logs/azureblob.go b/store/logs/azureblob.go index 5cda87e4..ba888b9e 100644 --- a/store/logs/azureblob.go +++ b/store/logs/azureblob.go @@ -51,8 +51,12 @@ func (az *azureBlobStore) Create(ctx context.Context, step int64, r io.Reader) e if err != nil { return err } + opts := &azblob.UploadStreamToBlockBlobOptions{ + BufferSize: 4 * 1024 * 1024, + MaxBuffers: 5, + } blobURL := az.containerURL.NewBlockBlobURL(fmt.Sprintf("%d", step)) - _, err = azblob.UploadStreamToBlockBlob(ctx, r, blobURL, azblob.UploadStreamToBlockBlobOptions{}) + _, err = azblob.UploadStreamToBlockBlob(ctx, r, blobURL, *opts) return err }