Skip to content
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

Merged
merged 2 commits into from
Aug 21, 2023
Merged

retry iot_config client rpcs #607

merged 2 commits into from
Aug 21, 2023

Conversation

jeffgrunewald
Copy link
Contributor

No description provided.

Code::Cancelled | Code::DeadlineExceeded | Code::Unavailable => {
if attempt < 3 {
attempt += 1;
tokio::time::sleep(Duration::from_millis(attempt * 100)).await;
Copy link
Contributor

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

Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

5 secs ?

Copy link
Contributor Author

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

Copy link
Contributor

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??

Copy link
Contributor

Choose a reason for hiding this comment

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

works for me

@bbalser bbalser merged commit 96209c3 into main Aug 21, 2023
1 check passed
@bbalser bbalser deleted the jg/retry-config-client branch August 21, 2023 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants