michaelklishin / quartz-mongodb

A MongoDB-based store for the Quartz scheduler. This fork strives to be as feature complete as possible. Originally by MuleSoft.
Other
249 stars 203 forks source link

work only with a replicaset, not a standalone server! #25

Closed mathieuruellan closed 11 years ago

mathieuruellan commented 11 years ago

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).

michaelklishin commented 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.

mathieuruellan commented 11 years ago

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.

michaelklishin commented 11 years ago

Yes I am sure. It's a stock MongoDB installation on Linux and OS X, running mongod.

mathieuruellan commented 11 years ago

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./

mathieuruellan commented 11 years ago

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.

michaelklishin commented 11 years ago

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.