[Bug] Calling `RedisPool.active_connections()` may block forever
Fred version - 9.2.1 Redis version - 7.2 Platform - linux Deployment type - cluster
Describe the bug
I have a locally running Redis cluster, and a pool of 4 connections to it. I periodically call .active_connections().await?.len() to count the currently active connections. However, if all the connections are down, or currently reconnecting, or something, the call will block forever.
To Reproduce Steps to reproduce the behavior:
- Start up a redis cluster
- Start a program that will set up a pool of 4 against the cluster
- Call
.active_connections().awaitin a loop every few second. - Bring the cluster down.
The loop should stop as the call will never return. The expectation is that it would not block, but instead would return an empty list.
Probably doesn't need the pool, maybe doesn't need the cluster, but this is how I tested it.
Logs Didn't capture them.
Hi @nakedible-p, good callout. I'll change that in the next update so it can preempt reconnections.
Thanks @nakedible-p, this should be fixed in 9.3.0