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
When I connect using mongoose to the primary node using the following connection uri mongodb://user:password@localhost:27017/dbName?authSource=admin&readPreference=primary
When I setup indexes on schema, it will not be created!
If the current behavior is a bug, please provide the steps to reproduce.
Indexes should be created successfully as I provide readPreference as primary which is the default one. If I omit readPreference from options indexes will be created successfully, I know that readPreference=primary is the default but we should handle this also.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
MongoDB: 4.4.9
Node.js: v14.17.5
Mongoose: 6.0.8
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
I want to report a bug.
What is the current behavior?
Suppose I have a replicaset with two nodes 1 primary and 1 secondary.
Primary: localhost:27017
Secondary: localhost:27018
When I connect using mongoose to the primary node using the following connection uri
mongodb://user:password@localhost:27017/dbName?authSource=admin&readPreference=primary
When I setup indexes on schema, it will not be created!
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Indexes should be created successfully as I provide readPreference as primary which is the default one. If I omit readPreference from options indexes will be created successfully, I know that readPreference=primary is the default but we should handle this also.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
MongoDB: 4.4.9
Node.js: v14.17.5
Mongoose: 6.0.8
The text was updated successfully, but these errors were encountered: