Fix/gcp large upload truncation - #464
Open
LihaoLiuXs wants to merge 3 commits into
Open
Conversation
Use storage.createFrom(BlobInfo, InputStream, BlobWriteOption...) instead of WriteChannel.write(ByteBuffer) for byte[] uploads. The WriteChannel approach introduced in 228ec40 did not handle payloads above ~6 MB correctly because a single write() call violates the GCS resumable upload protocol's chunking requirements. The createFrom() API is the GCS SDK's recommended approach - it internally handles chunking with a 15 MiB buffer and supports BlobWriteOption (including crc32cMatch) which was the original reason for the switch away from storage.create().
iamabhilaksh
reviewed
Jun 8, 2026
iamabhilaksh
left a comment
Contributor
There was a problem hiding this comment.
Heads up — this branch currently has zero net diff against main. The fix that was on this branch (commit 4c09d8b, switching WriteChannel.write(ByteBuffer) → storage.createFrom(InputStream, BlobWriteOption...) in GcpBlobStore) already merged via PR #450 on 2026-05-30 (merge commit 6069776).
Verified via:
gh api repos/salesforce/multicloudj/pulls/464/filesreturns[]gh pr diff 464is empty
Should we close this one as superseded? If the regression-test piece is still outstanding, commit 62eb900 ("Add the conformance test for large file upload with 16mb") lives in #465 — different scope.
Happy to be wrong if I'm misreading the state.
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.
Summary
< Provide a brief description of the changes in this PR >
Some conventions to follow
docstore:for document store module,blobstorefor Blob Store moduletest:perf: