-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:All
If 'ismaster' returns a list of hosts in a replica set the connection object calls self.__nodes.update() with the new list of node tuples. It should be replacing self.__nodes with the new host list. The current code causes two problems:
1. When specifying hosts using a mongodb URI and 'localhost' we see this:
>>> conn = pymongo.Connection('mongodb://localhost:27017,localhost:27018,localhost:27019/?slaveOk=true')
>>> conn
Connection(['localhost:27017', u'behackett-dt:27017', 'localhost:27019', 'localhost:27018', u'behackett-dt:27019', u'behackett-dt:27018'])
2. If the mongodb URI includes an arbiter we could potentially try to run queries against it as seen here:
http://groups.google.com/group/mongodb-user/browse_thread/thread/6a7bedcd552a0515#