-
Notifications
You must be signed in to change notification settings - Fork 5
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
refactor: add support for client timeouts #217
Conversation
public class ClientConfig { | ||
Duration timeout; | ||
|
||
public static ClientConfig DEFAULT = new ClientConfig(Duration.ofSeconds(5)); |
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.
Default looks good,
max for this as observed in past is <5s
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.
nit: we can add a TODO here to read this value POJO from config
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.
Because this is used by so many different services, I don't love providing it from config - since that means the config itself is needed to build the abstract store object which means every service now needs to get access to it and pass it in. The override case certainly could be from config, but let me think through how/if we could accomplish this.
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.
Added a todo, and moved the default up to 10s to make sure we're safe (since the intention here is to be as compatible with existing behavior as possible we don't even want to approach the 5s limit)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #217 +/- ##
============================================
+ Coverage 79.92% 80.02% +0.09%
- Complexity 488 496 +8
============================================
Files 54 55 +1
Lines 2416 2428 +12
Branches 106 107 +1
============================================
+ Hits 1931 1943 +12
+ Misses 425 424 -1
- Partials 60 61 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
This change adds support for client timeouts on all config store abstractions, using a default of 5s if unset.