Skip to content

Conversation

@biandratti
Copy link
Contributor

@biandratti biandratti commented Dec 3, 2020

Description

  • Add a timeout setting in RpcClient used from the actor “FaucetHandler”.
  • And change the property name man-backoff to max-backoff
  • Change the message that we show when a failed connection between faucet and node. I added a pretty message.

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.

@biandratti biandratti changed the title WIP [ETCM-396] faucet timeout [ETCM-396] faucet timeout Dec 3, 2020
Copy link
Contributor

@lemastero lemastero left a 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.

@biandratti biandratti added the BREAKS CONFIG Affects the default configuration label Dec 3, 2020
@jmendiola222 jmendiola222 requested a review from mmrozek December 4, 2020 14:43
Copy link

@ntallar ntallar left a 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

with Logger {

implicit lazy val actorTimeout: Timeout = Timeout(config.responseTimeout)
implicit lazy val actorTimeout: Timeout = Timeout(config.responseTimeout + config.rpcClient.timeout)
Copy link

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?

Copy link
Contributor Author

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”.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link

@ntallar ntallar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

 .\\            //.
. \ \          / /.
.\  ,\     /` /,.-
 -.   \  /'/ /  .
 ` -   `-'  \  -
   '.       /.\`
      -    .-
      :`//.'
      .`.'
      .' BP 

@ntallar ntallar merged commit 8735acc into develop Dec 4, 2020
@ntallar ntallar deleted the ETCM-396-faucet-timeout branch December 4, 2020 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BREAKS CONFIG Affects the default configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants