-
Notifications
You must be signed in to change notification settings - Fork 75
[ETCM-396] faucet timeout #829
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
Conversation
…-396-faucet-timeout
…-396-faucet-timeout
…-396-faucet-timeout
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.
LGTM 👍 This is a change in config. Probably worth to announce on proper channels.
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.
Minor comment and LGTM! I'll create the corresponding PR on devops side and we'll discuss with them about re-deploying it
@@ -16,7 +16,7 @@ class FaucetRpcService(config: FaucetConfig)(implicit system: ActorSystem) | |||
with FaucetHandlerSelector | |||
with Logger { | |||
|
|||
implicit lazy val actorTimeout: Timeout = Timeout(config.responseTimeout) | |||
implicit lazy val actorTimeout: Timeout = Timeout(config.responseTimeout + config.rpcClient.timeout) |
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.
It's a bit confusing having responseTimeout and rpcClient.timeout... maybe we should rename the first to actorCommunicationMargin
or something like that?
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.
Right, I can change the property too, with the same name “actor-communication-margin”.
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.
Done
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.
LGTM!
.\\ //.
. \ \ / /.
.\ ,\ /` /,.-
-. \ /'/ / .
` - `-' \ -
'. /.\`
- .-
:`//.'
.`.'
.' BP
Description
Proposed Solution
For default the rpc client used the idle-timeout, that represents 60 seconds. So, now we can set this configuration.
When the actor FaucetHandler calls the node through the client rpc, now set a timeout of the request, represented by “rpc-client.timeout”.
So, when the class “FaucetRpcService” calls the actor “FaucetHandler” set a timeout represented for the sum “response-timeout” (actor resolve) + “rpc-client.timeout” (rpc client resolve).
When we have a timeout between the faucet and the node, in re response we receive the next message: "Faucet error: RPC request timeout"
Testing
If you want to reproduce this case, you can set rpc-client.timeout with 1.milliseconds for example.