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

feat: configurable max_retries #307

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tltsutltsu
Copy link

@tltsutltsu tltsutltsu commented Nov 11, 2023

Resolves: #283

@rapiz1

@@ -208,6 +209,8 @@ pub struct ClientConfig {
pub heartbeat_timeout: u64,
#[serde(default = "default_client_retry_interval")]
pub retry_interval: u64,
#[serde(default)]
Copy link
Owner

Choose a reason for hiding this comment

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

Is this the correct way to set default value? See also retry_interval

@@ -543,6 +546,13 @@ impl ControlChannelHandle {
panic!("{:#}. Break", err);
}

retries += 1;
Copy link
Owner

Choose a reason for hiding this comment

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

I think we actually want to only abort the program when failures are in line. For example, three retry failures in line and abort the program. But your change seems to limit the total retry failures. It's common for long-running instances to have more retry failures because of network outrage. Say it runs for an hour, then fails, and runs for another hour, etc. In that case we don't want to limit the total retry failures, or we can only run for three hours. That said, you want to limit the retry failures in a similar style with the retry_backoff

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.

Add max_retries config
2 participants