Skip to content

Fix/gcp large upload truncation - #464

Open
LihaoLiuXs wants to merge 3 commits into
salesforce:mainfrom
LihaoLiuXs:fix/gcp-large-upload-truncation
Open

Fix/gcp large upload truncation#464
LihaoLiuXs wants to merge 3 commits into
salesforce:mainfrom
LihaoLiuXs:fix/gcp-large-upload-truncation

Conversation

@LihaoLiuXs

Copy link
Copy Markdown
Collaborator

Summary

< Provide a brief description of the changes in this PR >

Some conventions to follow

  1. add the module name as a prefix
    • for example: add a prefix: docstore: for document store module, blobstore for Blob Store module
  2. for a test only PR, add test:
  3. for a perf improvement only PR, add perf:
  4. for a refactoring only PR, add "refactor:"

LihaoLiuXs and others added 3 commits May 28, 2026 21:34
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 iamabhilaksh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/files returns []
  • gh pr diff 464 is 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants