Monstache is reading from Primary instead of secondary. Connection, permission, etc is present to secondary nodes as well. Tried readPreference=secondaryPreferred and readPreference=secondary and found no change in the read behaviour. Getting no error in logs. Sync is working.
Can you try to remove connect=direct from the URL? My understanding is that setting enables a direct connection to a single server and would disable the replica set features in the driver.
Monstache is reading from Primary instead of secondary. Connection, permission, etc is present to secondary nodes as well. Tried readPreference=secondaryPreferred and readPreference=secondary and found no change in the read behaviour. Getting no error in logs. Sync is working.
mongo-url=mongodb://<uname>:<pswd>@host1:27017,host2:27017,host3:27017/dbname?connect=direct&replicaSet=rs0&readPreference=secondaryPreferred
mongo-url=mongodb://<uname>:<pswd>@host1:27017,host2:27017,host3:27017/dbname?connect=direct&replicaSet=rs0&readPreference=secondary
Note:- monstache v6 with ES 7.5 and Mongo 3.6
Is there anything wrong with the mongo url?