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

fix: Limit retries when read resumes but stream keeps erroring #66

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

vrongmeal
Copy link
Member

No description provided.

@vrongmeal vrongmeal requested a review from a team as a code owner November 19, 2024 08:08
}
if let Some(duration) = backoff.as_mut().and_then(|b| b.next()) {
sleep(duration).await;
if let Ok(new_responses) = client.send_retryable(request.clone()).await {
Copy link
Member

Choose a reason for hiding this comment

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

so there will be another layer of retry-with-backoff here...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, the read request happens as usual with retries. The reason I added an outer backoff as well is if the read request returns a successful response but the stream keeps on erroring.

src/client.rs Outdated Show resolved Hide resolved
Signed-off-by: Vaibhav Rabber <[email protected]>
@vrongmeal
Copy link
Member Author

Updated the PR with config options for retries.

@vrongmeal vrongmeal merged commit 363cb80 into main Nov 19, 2024
3 checks passed
@vrongmeal vrongmeal deleted the vrongmeal/read-resumption-retry branch November 19, 2024 15:00
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.

2 participants