You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
isMaster returns only partial information when the MongoDB is not a member of a replica set. In particular, it will return
isMaster: true
and noprimary
field (at least on some servers I've tried on). As a result,pick-mongo-primary mongodb://localhost/db
returnsundefined/db
whereas it would ideally returnlocalhost/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 bypasspick-mongo-primary
.The text was updated successfully, but these errors were encountered: