-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.4.2
-
Component/s: None
-
None
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.