Details
-
Bug
-
Status: Closed
-
Critical - P2
-
Resolution: Fixed
-
None
-
None
-
None
-
ALL
Description
If any operation is run against a replica set while an election is in progress pymongo can get into a permanent failure state. Pymongo calls end_request after each failed attempt to find the replica set primary, adding a socket that is currently connected to a secondary to the connection pool. The next operation after we fail to find a new primary will use this socket under the assumption it is connected to the primary causing all operations to fail with a slaveOk error.