Skip to content

Commit

Permalink
Significantly reduce retry duration of service discovery (#1541)
Browse files Browse the repository at this point in the history
The current 66s is quite long and means you don't see your (generally
permanent) error quickly enough
  • Loading branch information
jackkleeman authored May 22, 2024
1 parent abed7e0 commit e8b09c3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions crates/node/src/roles/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,8 @@ impl AdminRole {
) -> Result<Self, AdminRoleBuildError> {
let config = updateable_config.pinned();

// Total duration roughly 66 seconds
let retry_policy = RetryPolicy::exponential(
Duration::from_millis(100),
2.0,
Some(10),
Some(Duration::from_secs(20)),
);
// Total duration roughly 1s
let retry_policy = RetryPolicy::exponential(Duration::from_millis(100), 2.0, Some(4), None);
let client =
ServiceClient::from_options(&config.common.service_client, AssumeRoleCacheMode::None)?;
let service_discovery = ServiceDiscovery::new(retry_policy, client);
Expand Down

0 comments on commit e8b09c3

Please sign in to comment.