Closed mathieuruellan closed 11 years ago
This can't be true, our test suite uses a single node and so do multiple (if not most) production instances I'm aware of.
Are you sure your single node is not a replica as well?
The only way you construct the mongo object is with the replica constructor
On 13/06/2013 13:51, Michael Klishin wrote:
This can't be true, our test suite uses a single node and so do multiple (if not most) production instances I'm aware of.
— Reply to this email directly or view it on GitHub https://github.com/michaelklishin/quartz-mongodb/issues/25#issuecomment-19386830.
Yes I am sure. It's a stock MongoDB installation on Linux and OS X, running mongod
.
Sorry to insist. I will test with a non-replica set. The comment on the used constructor is explicit mongo drivers version 2.10.1:
/ Creates a Mongo based on a list of replica set members or a list of mongos. * It will find all members (the master will be used by default). If you pass in a single server in the list, * the driver will still function as if it is a replica set. If you have a standalone server, * use the Mongo(ServerAddress) constructor./
I did a test with a single node and it works with a replica-set client connection. Even if it works at the moment, I don't feel secure if the behavior of the drivers change in the futur.
I believe as far as the client goes, talking to mongod
should not be any different from mongos
. Driver upgrades don't happen out of the sudden and should this change in the future, 10gen probably will mention this in the change log for 3.0
.
We have other issues to worry about in this project at the moment. Maybe we'll add more connection options some day.
the connectToDB() function call the mongo constructor with ServerAddress list. A the moment there is no way to use a standalone mongo node (no replicaset).