-
Notifications
You must be signed in to change notification settings - Fork 20
chore: Enhance HttpClient5 Retry-Strategy for 429 and 503 responses #1009
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
base: main
Are you sure you want to change the base?
Conversation
.../main/java/com/sap/cloud/sdk/cloudplatform/connectivity/DefaultApacheHttpClient5Factory.java
Outdated
Show resolved
Hide resolved
| if( retry ) { | ||
| final String msg = | ||
| "Retrying {} request for destination {} to {} due to exception \"{}\". Retry attempt #{}."; | ||
| log.debug(msg, req.getMethod(), destination, req.getRequestUri(), exception.getMessage(), execCount); |
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.
should be at least warn, maybe even error
| log.debug(msg, req.getMethod(), destination, req.getRequestUri(), exception.getMessage(), execCount); | |
| log.warn(msg, req.getMethod(), destination, req.getRequestUri(), exception.getMessage(), execCount); |
| final boolean retry = super.retryRequest(req, exception, execCount, context); | ||
| if( retry ) { | ||
| final String msg = | ||
| "Retrying {} request for destination {} to {} due to exception \"{}\". Retry attempt #{}."; |
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.
| "Retrying {} request for destination {} to {} due to exception \"{}\". Retry attempt #{}."; | |
| "Retrying {} request to {} due to exception \"{}\". Retry attempt #{}."; |
since destination can be null and may not add much information if the URL is absolute (is it?). Alternatively, explicit null check to avoid strange looking log?
MatKuhr
left a comment
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.
is there a way to print out the wait duration?
Context
Related #1004
Log message written to
debug: