Since WaitQueueTimeoutError is a subclass of ConnectionFailure, it causes the pool to be cleared here:
elif isinstance(error, ConnectionFailure): # "Client MUST replace the server's description with type Unknown # ... MUST NOT request an immediate check of the server." if not self._settings.load_balanced: await self._process_change(ServerDescription(address, error=error)) # Clear the pool. await server.reset(service_id) # "When a client marks a server Unknown from `Network error when # reading or writing`_, clients MUST cancel the hello check on # that server and close the current monitoring connection." server._monitor.cancel_check()
This is a major bug because WaitQueueTimeoutError should not have side effects. Worse WaitQueueTimeoutError is likely to happen when the system is under heavy load and clearing the pool will likely make that worse.
- is related to
-
DRIVERS-3130 Test that wait queue timeout errors do not clear the pool
-
- Investigating
-