Hi, I ran into the following situation. When having connection issues, closing or disposing the ConnectionMutex can cause some in flight requests to not cancel or timeout.
We've discovered this, because we have some convoluted connection restoration logic in our microservices that tries to throw away the multiplexer if there are too many failed requests and sometimes this logic causes the service to become stuck, because redis calls do not return.
I have reduced the issue to this minimal example:
ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost"); var db = redis.GetDatabase(); var result = db.StringSetAndGetAsync("a", "b", null, When.Always, CommandFlags.None); // Breakpoint here and stop the redis server, then resume the program redis.Close(); Console.WriteLine(await result.ToString()); // Hangs forever
I would expect the await to throw in this situation, not to hang.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4