Skip to content

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

Merged
sydney-munro merged 1 commit into
feat/transfer-managerfrom
chunked-download-exception
Jun 13, 2023
Merged

feat: Exceptions for Chunked Downloads and Precondition Failure tests#2062
sydney-munro merged 1 commit into
feat/transfer-managerfrom
chunked-download-exception

Conversation

@sydney-munro

Copy link
Copy Markdown
Contributor

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 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

@BenWhitehead BenWhitehead left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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.

2 participants