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: allow specifying an expected object size for resumable operations. #2661

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

BenWhitehead
Copy link
Collaborator

Update resumable upload failure detection to be more specific about classifying a request as SCENARIO_5

Fixes #2511

@BenWhitehead BenWhitehead added the owlbot:ignore instruct owl-bot to ignore a PR label Aug 6, 2024
@BenWhitehead BenWhitehead requested a review from a team as a code owner August 6, 2024 17:30
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: storage Issues related to the googleapis/java-storage API. labels Aug 6, 2024
&& ed.getErrorInfo() != null
&& ed.getErrorInfo().getReason().equals("GRPC_MISMATCHED_UPLOAD_SIZE"))) {
clientDetectedError(
ResumableSessionFailureScenario.SCENARIO_5.toStorageException(
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we get some comments around what Scenario 5 is to make it easier to read?

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh i see this was there before as well. my apologies. that can be a followup.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ResumableSessionFailureScenario is an enum that is shared by several of our upload implementations and defines the types of failure scenarios that can happen when processing an upload request.

SCENARIO_5 is client side data loss detected

SCENARIO_5(
BaseServiceException.UNKNOWN_CODE,
"dataLoss",
"Client side data loss detected. Attempt to append to a resumable session with an offset higher than the backend has"),

&& ed.getErrorInfo() != null
&& ed.getErrorInfo().getReason().equals("GRPC_MISMATCHED_UPLOAD_SIZE"))) {
clientDetectedError(
ResumableSessionFailureScenario.SCENARIO_5.toStorageException(
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh i see this was there before as well. my apologies. that can be a followup.

Update resumable upload failure detection to be more specific about classifying a request as SCENARIO_5

Fixes #2511
@BenWhitehead BenWhitehead merged commit 3405611 into main Aug 23, 2024
20 of 21 checks passed
@BenWhitehead BenWhitehead deleted the fix-2511 branch August 23, 2024 17:31
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. owlbot:ignore instruct owl-bot to ignore a PR size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow specifying the content length for resumable uploads
2 participants