Repository navigation
feat(gax): align resumable upload chunk size to server granularity and surface effective chunk size - #14670
feat(gax): align resumable upload chunk size to server granularity and surface effective chunk size#14670whowes wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the concept of an 'effective chunk size' to the resumable upload process, aligning the configured chunk size with the server's chunk granularity and exposing it via ResumableUploadFuture and ResumableUploadProgress. Feedback on these changes highlights two key concurrency and safety improvements in ResumableUploadFutureImpl.java: first, avoiding a potential NullPointerException by formatting the nullable effectiveChunkSize with %s instead of %d and localizing volatile reads; second, ordering volatile writes so that effectiveChunkSize is written before uploadSessionUrl to ensure consistent visibility across threads.
…d surface effective chunk size
0ad413f to
5616230
Compare
|
|





X-Goog-Upload-Chunk-GranularityinResumableUploadFutureImplonce session initiation completes.ResumableUploadFuture.getEffectiveChunkSize(),ResumableUploadProgress.getEffectiveChunkSize(), and in terminalApiExceptionmessages alongside the upload URL.