Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Exceptions for Chunked Downloads and Precondition Failure tests #2062

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

sydney-munro
Copy link
Collaborator

Plumbing of exceptions for chunked downloads and snuck in a standard precondition failure test without skipIfExists set to true.

@sydney-munro sydney-munro requested a review from a team as a code owner June 12, 2023 21:35
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/java-storage API. labels Jun 12, 2023
Copy link
Collaborator

@BenWhitehead BenWhitehead left a comment

Choose a reason for hiding this comment

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

One additional failure case, but looks good otherwise.

ByteStreams.copy(rc, wc);
} catch (IOException e) {
throw new StorageException(e);
bytesCopied = ByteStreams.copy(rc, wc);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we know how many bytes we expect we should validate we receive them here.

There are circumstances where we've seen a connection get truncated without throwing an error, and are not retried.

@sydney-munro sydney-munro merged commit 12a7a6f into feat/transfer-manager Jun 13, 2023
@sydney-munro sydney-munro deleted the chunked-download-exception branch June 13, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants