Skip to content

feat(gax): implement baseline Callable and Future for resumable uploads - #14241

Open
whowes wants to merge 1 commit into
mainfrom
whowes/resumable-upload-happy-path
Open

feat(gax): implement baseline Callable and Future for resumable uploads#14241
whowes wants to merge 1 commit into
mainfrom
whowes/resumable-upload-happy-path

Conversation

@whowes

@whowes whowes commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

This implementation supports the happy path only; retries, recovery, and progress tracking will be added in subsequent phases.

gemini-code-assist[bot]

This comment was marked as outdated.

@whowes

whowes commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

gemini-code-assist[bot]

This comment was marked as outdated.

@whowes
whowes force-pushed the whowes/resumable-upload-happy-path branch from b8fc38f to 234e79f Compare September 2, 2026 22:08
@whowes
whowes force-pushed the whowes/resumable-upload-happy-path branch from 234e79f to 6845669 Compare September 2, 2026 22:32
@whowes

whowes commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces the concrete implementation of ResumableUploadCallable and ResumableUploadFuture (ResumableUploadCallableImpl and ResumableUploadFutureImpl) to coordinate resumable upload sessions and stream chunks asynchronously, along with comprehensive unit tests. The feedback highlights a potential issue where performing blocking I/O (ByteStreams.read) inside asynchronous future callbacks could lead to thread starvation or deadlocks if a limited executor is used, suggesting either documenting executor requirements or offloading the blocking read.

byte[] buffer = new byte[chunkSize];
int bytesRead;
try {
bytesRead = ByteStreams.read(payload, buffer, 0, chunkSize);

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.

medium

Performing blocking I/O (ByteStreams.read) inside asynchronous future callbacks (which run on the provided executor) can lead to thread starvation or deadlocks if the executor is a direct executor or a limited thread pool (such as gRPC network threads). Consider documenting that the executor passed to the callable must be a dedicated thread pool suitable for blocking I/O operations, or offloading the blocking read to a dedicated I/O executor.

@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@whowes
whowes requested a review from blakeli0 September 2, 2026 22:59
@whowes
whowes marked this pull request as ready for review September 2, 2026 22:59
@whowes
whowes requested review from a team as code owners September 2, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant