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
We were using mongojs version 0.18.2 and node version 4.4.0 and the connection string we used was
mongodb://dbName:userId@a:27018,b:27018,c:27018/dbName?readPreference=secondaryPreferred&maxStalenessSeconds=120
The connection was successful and all the writes were going to primary server a:27018 and reads were going to secondary servers b:27018 and c:27018.
Now when we upgraded the node version to 10.15, we also upgraded the mongojs to latest version 2.6.0. When we tried to use the same connection string, it gave error that replicaSet option is mandatory. So we modified the connection string to use replicaSet like
mongodb://dbName:userId@a:27018,b:27018,c:27018/dbName?readPreference=secondaryPreferred&maxStalenessSeconds=120&replicaSet=qa
With the new connection string, all the reads and writes are going to primary server and there are no read calls to secondary server even though the readPreference=secondaryPreferred option is present. Can you please check this issue?
Note: If we change the readPreference to secondary instead of secondaryPreferred, then we get cursor error wireProtocolHandler is null
The text was updated successfully, but these errors were encountered:
We were using mongojs version 0.18.2 and node version 4.4.0 and the connection string we used was
mongodb://dbName:userId@a:27018,b:27018,c:27018/dbName?readPreference=secondaryPreferred&maxStalenessSeconds=120
The connection was successful and all the writes were going to primary server a:27018 and reads were going to secondary servers b:27018 and c:27018.
Now when we upgraded the node version to 10.15, we also upgraded the mongojs to latest version 2.6.0. When we tried to use the same connection string, it gave error that replicaSet option is mandatory. So we modified the connection string to use replicaSet like
mongodb://dbName:userId@a:27018,b:27018,c:27018/dbName?readPreference=secondaryPreferred&maxStalenessSeconds=120&replicaSet=qa
With the new connection string, all the reads and writes are going to primary server and there are no read calls to secondary server even though the readPreference=secondaryPreferred option is present. Can you please check this issue?
Note: If we change the readPreference to secondary instead of secondaryPreferred, then we get cursor error wireProtocolHandler is null
The text was updated successfully, but these errors were encountered: