-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Update REST Client to Support Custom R/W Timeouts #4285
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4285 +/- ##
==========================================
+ Coverage 59.1% 59.11% +<.01%
==========================================
Files 217 217
Lines 14595 14597 +2
==========================================
+ Hits 8627 8629 +2
Misses 5330 5330
Partials 638 638 |
server.TrapSignal(func() { | ||
err := rs.listener.Close() | ||
rs.log.Error("error closing listener", "err", err) | ||
}) | ||
|
||
cfg := rpcserver.DefaultConfig() |
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.
Why are you dropping DefaultConfig()
? Couldn't we override only the values that we want to override and fallback to the defaults?
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 there is no longer a need for DefaultConfig()
. Config
is defined by three values which we each set manually. ie. the call would be redundant.
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.
I see - fair enough
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.
Left a small remark, looks good otherwise
cmd.Flags().Int(FlagMaxOpenConnections, 1000, "The number of maximum open connections") | ||
cmd.Flags().Uint(FlagMaxOpenConnections, 1000, "The number of maximum open connections") | ||
cmd.Flags().Uint(FlagRPCReadTimeout, 10, "The RPC read timeout (in seconds)") | ||
cmd.Flags().Uint(FlagRPCWriteTimeout, 10, "The RPC write timeout (in seconds)") |
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 this the timeout in order to receive conformation that your write request was successful? Like what is a rest write?
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.
@rigelrozanski yeah, the write timeout, from the REST client pov, is mainly for broadcasting.
closes: #4263
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added a relevant changelog entry:
clog add [section] [stanza] [message]
rereviewed
Files changed
in the github PR explorerFor Admin Use: