Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-replica MongoDBs #1

Open
edemaine opened this issue Aug 23, 2017 · 1 comment
Open

Support non-replica MongoDBs #1

edemaine opened this issue Aug 23, 2017 · 1 comment

Comments

@edemaine
Copy link

isMaster returns only partial information when the MongoDB is not a member of a replica set. In particular, it will return isMaster: true and no primary field (at least on some servers I've tried on). As a result, pick-mongo-primary mongodb://localhost/db returns undefined/db whereas it would ideally return localhost/db.

I know your software is not particularly relevant to such simple databases, but some software such as Kadira uses pick-mongo-primary and it'd be nice to easily use such software on a simple MongoDB without replica sets. Currently I have to bypass pick-mongo-primary.

@markreid
Copy link

hey @edemaine i'm not sure what your exact use-case is, but if you have a single instance you can enable a replica set without actually having to add other instances to the set. it's sort of the long way round but it resolves the problem with this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants