Skip to content

Commit cd35e99

Browse files
committed
fix: don't disable lazy connections when in standalone mode
1 parent d0d8431 commit cd35e99

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apollo-router/src/cache/redis.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,12 @@ impl RedisCacheStorage {
377377
};
378378

379379
// PR-8405: must not use lazy connections or else commands will queue rather than being sent
380-
config.replica.lazy_connections = false;
380+
// PR-8671: must only disable lazy connections in cluster mode. otherwise, fred will
381+
// try to connect to unreachable replicas and fall over.
382+
// https://github.com/aembke/fred.rs/blob/f222ad7bfba844dbdc57e93da61b0a5483858df9/src/router/replicas.rs#L34
383+
if is_cluster {
384+
config.replica.lazy_connections = false;
385+
}
381386
})
382387
.with_performance_config(|config| {
383388
config.default_command_timeout = timeout;

0 commit comments

Comments
 (0)