Details
-
Bug
-
Status: Closed
-
Minor - P4
-
Resolution: Fixed
-
2.4.2
-
None
-
None
Description
If N threads are using a MongoClient with Mongos high-availability, the first thread to get a connection error will call disconnect(). Then all threads may simultaneously run the reconnect logic; last one wins. We should synchronize reconnection so only one thread does the work of finding the nearest mongos.