Repository navigation
feat(streamingwrites): wire parallel uploads behind the experimental flag - #5290
Draft
PranjalC100 wants to merge 2 commits into
Draft
PranjalC100 wants to merge 2 commits into
PranjalC100 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for parallel uploads on Rapid Cache Ultra (RCU) buckets when rapid writes are enabled. Key changes include routing parallel write strategies to the unbuffered write handler, configuring parallel upload attributes (such as part size and concurrency) on the storage writer, and removing the unused 'chunkSize' parameter from the 'CreateObjectChunkWriter' interface across all bucket implementations. Additionally, the fake object writer was updated to respect context cancellation, and comprehensive unit and integration tests were added to validate parallel upload behaviors. I have no feedback to provide as there are no review comments.
PranjalC100
force-pushed
the
parallel-upload/fs-integration
branch
from
November 26, 2026 12:34
f3b26cc to
c7a7c80
Compare
…fered write handler With write.experimental-enable-parallel-upload, BucketType.WriteStrategy() returns WriteStrategyParallel for rapid writes on Rapid Cache Ultra buckets, and NewWriteHandler returns the unbuffered write handler for it. The fs and inode code already goes through the WriteHandler interface for every FUSE operation, so only the ReadFile comment changes. Adds fs and inode test suites for parallel uploads. bucketHandle sets up the parallel upload writers in the next commit. Nothing changes while the flag is off.
When the bucket's write strategy is parallel, bucketHandle sets EnableParallelUpload and ParallelUploadConfig on the writers from CreateObject (staged writes) and CreateObjectChunkWriter (streaming writes): - PartSize is write.block-size-mb rounded up to a multiple of 32 MiB, with a 32 MiB minimum. - MaxConcurrency is write.max-blocks-per-file. Unlimited (-1, rationalized to math.MaxInt16) maps to 0, the SDK default. CreateObject aborts a parallel upload when copying the contents fails, so its buffers and upload session aren't leaked. CreateObjectChunkWriter drops its chunkSize argument. bucketHandle sets ChunkSize from write.block-size-mb, the value the buffered write handler passed. Preconditions stay set on parallel upload writers (TODO(b/567198348)).
PranjalC100
force-pushed
the
parallel-upload/fs-integration
branch
from
November 30, 2026 18:18
c7a7c80 to
b8fff71
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Stacked on #5232. It wires gRPC parallel uploads behind the hidden
write.experimental-enable-parallel-uploadflag (design: go/gcsfuse-grpc-parallel-upload-v1-integration). One commit per step:WriteStrategy()returnsWriteStrategyParallelfor rapid writes on Rapid Cache Ultra buckets (TODO(b/576160379)for GA), andNewWriteHandlerreturns the unbuffered write handler for it. fs.go needs no logic change, only theReadFilecomment. Adds fs and inode suites for parallel uploads.CreateObjectandCreateObjectChunkWriterenable parallel uploads.PartSizeiswrite.block-size-mbrounded up to a multiple of 32 MiB;MaxConcurrencyiswrite.max-blocks-per-file(unlimited uses the SDK default).CreateObjectaborts the writer when copying fails.CreateObjectChunkWriterdrops itschunkSizeargument; bucketHandle setsChunkSizefromwrite.block-size-mb.Not in this PR: skipping preconditions for parallel uploads (
TODO(b/567198348)). The current Go SDK uploads parts as temporary objects and composes them, which RAPID doesn't support (TODO(b/540721232)).Link to the issue in case of a bug fix.
b/581184469
Testing details
TestStreamingWritesParallelUploadTest(15 tests; 10/10 fresh-process runs), inode suiteFileStreamingWritesParallelUploadTest,TestNewWriteHandler_RoutesByWriteStrategy,WriteStrategyandlookupBucketTypecases, and bucketHandle writer attribute, part size and copy error tests.-racepasses for the changed packages, apart from two timing tests ininternal/storagethat flake on master too. Ininternal/fs, the new clobber test hits a fake bucket race under-race; the fake fix follows in a separate PR (b/584925513).Any backward incompatible change? If so, please explain.
No. Nothing changes while the hidden flag is off.