KEMBAR78
feat: allow specifying an expected object size for resumable operations. by BenWhitehead · Pull Request #2661 · googleapis/java-storage · GitHub
Skip to content

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
Contributor

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
Contributor

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
Contributor

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