Skip to content

Commit 6cbfcf8

Browse files
committed
Turn backoff off for routed connections
1 parent 23b09f6 commit 6cbfcf8

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

lib/src/pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl ConnectionManager {
3131
}
3232

3333
pub fn backoff(&self) -> Option<ExponentialBuilder> {
34-
self.backoff.clone()
34+
self.backoff
3535
}
3636
}
3737

lib/src/routing/connection_registry.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ async fn refresh_routing_table(
176176
server.clone(),
177177
create_pool(&Config {
178178
uri,
179+
backoff: None,
179180
..config.clone()
180181
})?,
181182
);

lib/src/routing/routed_connection_manager.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use crate::config::BackoffConfig;
21
use crate::pool::ManagedConnection;
32
use crate::routing::connection_registry::{
43
start_background_updater, BoltServer, ConnectionRegistry, RegistryCommand,
@@ -28,6 +27,9 @@ const ROUTING_TABLE_MAX_WAIT_TIME_MS: i32 = 5000;
2827

2928
impl RoutedConnectionManager {
3029
pub fn new(config: &Config, provider: Arc<dyn RoutingTableProvider>) -> Result<Self, Error> {
30+
// backoff config should be set to None here, since the routing table updater will handle retries
31+
// We could provide some configuration to "force" the retry mechanism in a clustered env,
32+
// but for now we will turn it off
3133
let backoff = config
3234
.backoff
3335
.clone()

0 commit comments

Comments
 (0)