Repository navigation
fix(storage): retry retryable HTTP status codes (408/429/5xx) for XML multipart upload operations #14802
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
Open
chandra-siri
wants to merge
1
commit into
main
Choose a base branch
from
fix/storage-mpu-retry-http-status-b578428746
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,187
−2
Open
fix(storage): retry retryable HTTP status codes (408/429/5xx) for XML multipart upload operations #14802
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -347,6 +347,37 @@ enum ThrowableCategory { | |||||
| AUTH_RETRYABLE_TRUE(new RetryableException(true)), | ||||||
| AUTH_RETRYABLE_FALSE(new RetryableException(false)), | ||||||
| UNKNOWN_HOST_EXCEPTION(C.UNKNOWN_HOST_EXCEPTION), | ||||||
| STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_401( | ||||||
| new StorageException(0, "code 0 wrapping http 401", C.HTTP_401)), | ||||||
| STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_403( | ||||||
| new StorageException(0, "code 0 wrapping http 403", C.HTTP_403)), | ||||||
| STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_404( | ||||||
| new StorageException(0, "code 0 wrapping http 404", C.HTTP_404)), | ||||||
| STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_408( | ||||||
| new StorageException(0, "code 0 wrapping http 408", C.HTTP_409)), | ||||||
| STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_429( | ||||||
| new StorageException(0, "code 0 wrapping http 429", C.HTTP_429)), | ||||||
| STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_500( | ||||||
| new StorageException(0, "code 0 wrapping http 500", C.HTTP_500)), | ||||||
| STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_502( | ||||||
| new StorageException(0, "code 0 wrapping http 502", C.HTTP_502)), | ||||||
| STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_503( | ||||||
| new StorageException(0, "code 0 wrapping http 503", C.HTTP_503)), | ||||||
| STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_504( | ||||||
| new StorageException(0, "code 0 wrapping http 504", C.HTTP_504)), | ||||||
| COALESCED_HTTP_RESPONSE_EXCEPTION_401(StorageException.coalesce(C.HTTP_401)), | ||||||
| COALESCED_HTTP_RESPONSE_EXCEPTION_403(StorageException.coalesce(C.HTTP_403)), | ||||||
| COALESCED_HTTP_RESPONSE_EXCEPTION_404(StorageException.coalesce(C.HTTP_404)), | ||||||
| COALESCED_HTTP_RESPONSE_EXCEPTION_408(StorageException.coalesce(C.HTTP_409)), | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly,
Suggested change
References
|
||||||
| COALESCED_HTTP_RESPONSE_EXCEPTION_429(StorageException.coalesce(C.HTTP_429)), | ||||||
| COALESCED_HTTP_RESPONSE_EXCEPTION_500(StorageException.coalesce(C.HTTP_500)), | ||||||
| COALESCED_HTTP_RESPONSE_EXCEPTION_502(StorageException.coalesce(C.HTTP_502)), | ||||||
| COALESCED_HTTP_RESPONSE_EXCEPTION_503(StorageException.coalesce(C.HTTP_503)), | ||||||
| COALESCED_HTTP_RESPONSE_EXCEPTION_504(StorageException.coalesce(C.HTTP_504)), | ||||||
| STORAGE_EXCEPTION_0_AUTH_RETRYABLE_TRUE( | ||||||
| new StorageException(0, "code 0 wrapping auth retryable", new RetryableException(true))), | ||||||
| STORAGE_EXCEPTION_0_AUTH_RETRYABLE_FALSE( | ||||||
| new StorageException(0, "code 0 wrapping auth retryable", new RetryableException(false))), | ||||||
| ; | ||||||
|
|
||||||
| private final Throwable throwable; | ||||||
|
|
@@ -1082,6 +1113,206 @@ private static ImmutableList<Case> getAllCases() { | |||||
| ThrowableCategory.UNKNOWN_HOST_EXCEPTION, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_401, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_401, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_403, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_403, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_404, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_404, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_408, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.DEFAULT_MORE_PERMISSIBLE), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_408, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_429, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.DEFAULT_MORE_PERMISSIBLE), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_429, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_500, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.DEFAULT_MORE_PERMISSIBLE), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_500, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_502, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.DEFAULT_MORE_PERMISSIBLE), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_502, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_503, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.DEFAULT_MORE_PERMISSIBLE), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_503, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_504, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.DEFAULT_MORE_PERMISSIBLE), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_504, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_401, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_401, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_403, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_403, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_404, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_404, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_408, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_408, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.DEFAULT_MORE_STRICT), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_429, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_429, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.DEFAULT_MORE_STRICT), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_500, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_500, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.DEFAULT_MORE_STRICT), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_502, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_502, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.DEFAULT_MORE_STRICT), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_503, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_503, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.DEFAULT_MORE_STRICT), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_504, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.COALESCED_HTTP_RESPONSE_EXCEPTION_504, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.DEFAULT_MORE_STRICT), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_AUTH_RETRYABLE_TRUE, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.YES, | ||||||
| Behavior.DEFAULT_MORE_PERMISSIBLE), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_AUTH_RETRYABLE_TRUE, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_AUTH_RETRYABLE_FALSE, | ||||||
| HandlerCategory.IDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME), | ||||||
| new Case( | ||||||
| ThrowableCategory.STORAGE_EXCEPTION_0_AUTH_RETRYABLE_FALSE, | ||||||
| HandlerCategory.NONIDEMPOTENT, | ||||||
| ExpectRetry.NO, | ||||||
| Behavior.SAME)) | ||||||
| .build(); | ||||||
| } | ||||||
|
|
||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a discrepancy here where
STORAGE_EXCEPTION_0_HTTP_RESPONSE_EXCEPTION_408is wrappingC.HTTP_409instead ofC.HTTP_408. This appears to be a copy-paste typo. Please useC.HTTP_408to ensure the test correctly validates behavior for HTTP 408 (Request Timeout).References