-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Connections, Spec Comp
> The client SHOULD close all idle sockets in its connection pool for the server: if one socket is bad, it is likely that all are.
This to me reads that, in the event of a non-timeout network error on (any) connection, all connections in that server's pool should be closed (which is easiest to achieve by bumping the pool's generation).
Looking through rescue handlers for SocketError, I am not seeing code in the driver that would implement this behavior.
It seems that https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#error-handling was not completely implemented either, specifically the bits about setting servers to unknown upon various node is recovering errors. This is currently done in the retryable writes module but it should be done in the per-operation error handler on a connection, so that even operations not subject to retryable writes get topology transitions done that are meant to result from not master/node is recovering errors.