Skip to content

Commit 98b149f

Browse files
authored
Merge pull request #11 from cpriti-os/docs/pcu-writer-go-10739620449861984208
docs: Update `EnableParallelUpload` documentation in `writer.go`
2 parents a70f04f + b39a933 commit 98b149f

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

storage/writer.go

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,29 @@ type Writer struct {
183183
// parallel. Supported exclusively for gRPC clients. If used with a JSON
184184
// client, the configuration is ignored and a standard upload is performed.
185185
//
186-
// Upon completion of a parallel upload, the Writer makes a best-effort attempt to clean up any temporary parts created.
187-
// It is recommended to set appropriate bucket lifecycle policies to reliably clean up any leftover objects to avoid unnecessary storage costs.
188-
// Temporary parts have the prefix: "gcs-go-sdk-pu-tmp".
186+
// Parallel uploads can yield higher throughput when uploading
187+
// large objects. However, there are some things which must be kept in mind
188+
// when choosing to use this strategy:
189+
// - Performing parallel uploads costs more money. Class A operations
190+
// are performed to create each part. If a storage
191+
// tier other than STANDARD is used, early deletion fees apply to deletion of
192+
// the parts.
193+
// - The service account/credentials used to perform the parallel
194+
// upload require `storage.objects.delete` in order to clean up the temporary
195+
// part objects.
196+
// - A failed upload can leave part objects behind
197+
// which will count as storage usage, and you will be billed for it.
198+
// Upon completion or failure of a parallel upload, the Writer makes a
199+
// best-effort attempt to clean up any temporary parts created. However, if the
200+
// program crashes there is no means for the client to perform the cleanup.
201+
// Temporary parts have the prefix: "gcs-go-sdk-pu-tmp". It is recommended to
202+
// set appropriate bucket lifecycle policies to reliably clean up any leftover
203+
// objects to avoid unnecessary storage costs.
204+
// - Using parallel uploads is not a one size fits all solution.
205+
// They have very real overhead until uploading a large enough object. The
206+
// inflection point is dependent upon many factors, and there is no one size
207+
// fits all value. You will need to experiment with your deployment and workload
208+
// to determine if parallel uploads are useful to you.
189209
//
190210
// **Note:** This feature is currently experimental and its API surface may change
191211
// in future releases. It is not yet recommended for production use.

0 commit comments

Comments
 (0)