-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.2.1
-
Component/s: Replica Set
-
None
-
Environment:mongodb 2.6
In some case replica set topology is not updated when node are removed and added from replica set. This leads to no server available into the driver even if the replica set has.
You can replicate with this sinatra application https://github.com/ajoulie/replica_set
1 - Launch a mongodb replica set with 3 instances (locally on port 27017, 2018 and 27019, for example).
2 - launch the application and visit http://localhost:9292/rs
3 - Remove the two secondary node on rs with rs.remove("<host>:<port>").
4 - Add two more nodes on other ports (27020 and 27021, for example).
5 - visit http://localhost:9292/rs, the list of the servers memorized by the driver is not updated with the last two nodes added.
Note : Of course, if I restart the application, everything is updated.