-
Notifications
You must be signed in to change notification settings - Fork 21
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
retry iot_config client rpcs #607
Conversation
iot_config/src/client/mod.rs
Outdated
Code::Cancelled | Code::DeadlineExceeded | Code::Unavailable => { | ||
if attempt < 3 { | ||
attempt += 1; | ||
tokio::time::sleep(Duration::from_millis(attempt * 100)).await; |
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.
delay between attempts is very short. Doesnt give much time for any transitory issue to resolve
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.
@andymck What do you think it should be?
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.
5 secs ?
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.
We default the rpc timeout in the client endpoint builder to 5 sec already so it should probably be less then that since we’re making three calls but I can skip the increasing back off and just retry 3 times at the default. That reminds me though we’d talked about modifying the request to set the timeout header which is going to shoot this whole thing down
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.
Should we start with 1 second, so then do 1,2,3??
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.
works for me
No description provided.