KEMBAR78
feat: Exceptions for Chunked Downloads and Precondition Failure tests by sydney-munro · Pull Request #2062 · googleapis/java-storage · GitHub
Skip to content

Conversation

@sydney-munro
Copy link
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 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