-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
readPreference secondaryPreferred causes "Unable to create case insensitive username index: not master" #7048
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
Comments
I believe this has been fixed in the latest version of the mongo driver. https://jira.mongodb.org/browse/NODE-2784 We are looking into updating the driver. |
Here are some workaround suggestions:
|
I tried that. Same problem.
…On Wed, Dec 9, 2020 at 10:08 AM Manuel ***@***.***> wrote:
A workaround may be - I haven't tested it - to remove the readPreference
from the connection string and instead set it in the Parse Server
configuration as driver option.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7048 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIF47TTJGNMSGM5HCVEBL3ST64LRANCNFSM4URFMBNQ>
.
|
@mtrezza manually create the index in the DB does not work. As a matter of fact, when I test removed the readPrefrence settings, it worked and created the index. But when add back the readPreference, code probably is trying to ensure index exists and still fails even the index is already there
|
I cannot reproduce this with an existing Parse Server deployment by adding |
@mtrezza is your DB a cluster with 3 nodes (mine on MongoDB Atlas)? |
Yes, I tried it with a 3 node (PSS) replica set. Just to be sure I also tried to use the exactly same connection string parameters as yours, still works. Maybe you want to post the created index? You could also try to upgrade the Parse Server mongodb dependency to 3.6.3. |
Upgrade to 3.6.3 definitely works. I guess I have to install from my repo for a while. I'm creating a PR |
I reopened the issue because it still exists and the PR has not been merged yet. |
Closing via #7026 |
New Issue Checklist
Issue Description
When Mongo URI has readPreference set to secondaryPreferred (and connecting to a Mongo Atlas cluster) we get the following error:
Steps to reproduce
Create a cluster with 3 nodes on MongoDB Atlas. I feel a cluster anywhere can reproduce
Environment
Server
Database
Logs
The text was updated successfully, but these errors were encountered: