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

fix #4788 moving retry logic into the standard layer #4825

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

shawkins
Copy link
Contributor

@shawkins shawkins commented Feb 2, 2023

Description

Fix #4788

This makes the retry logic common for all requests - sendAsync, consumeBytes, and websockets. There wasn't a great way of making the client executor available due to when the httpclient is created vs when the executor is obtained - further refactoring could probably make this work, but for now since the httpclient calls are non-blocking I'm just running the delayed task in the scheduling thread.

@manusa see if you want to refine the max connections test based upon this.

This does blur the line between the request and watch retries. Low level issues can be handled by the request retry, while higher level ones, such as repeated error status responses would still need to be handled by the watch retry.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@manusa
Copy link
Member

manusa commented Feb 10, 2023

@manusa see if you want to refine the max connections test based upon this.

I think the test is fine as it is. In the end we didn't add the retry logic to the test. The test "improves" the embedded HttpServer reliability (also for OkHttp MockServer). All in all, I think that having more solid Mock servers will allow us to identify and isolate implementation problems in the future.

Signed-off-by: Marc Nuri <marc@marcnuri.com>
@sonarcloud
Copy link

sonarcloud bot commented Feb 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

92.4% 92.4% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move exponential backoff handling to standard client layer
3 participants