Closed AndreaCrotti closed 10 years ago
You can set ?slaveOk=true
or ?readPreference=secondary
in the connection URL.
The README documents this at the bottom of the "Usage" section, but I'd be happy to hear ideas for how to make that more discoverable
Ok thanks sorry it turns out I can also query the primary anyway. What do you mean with the last sentence? I don't see anything about slave in the README.. It could be in a FAQ section but it's more really a Mongo question in a way than a mosql question.
The README documents ?readPreference=secondary
and mentions doing initial imports against secondaries (mongo calls "slave" nodes secondaries, as of the "new" replication architecture)
Ah sorry I was looking for "slave" in the page and was not finding it. Well as a FAQ there could be the error I reported and what is the option to pass to be more complete..
2014-08-21 18:10 GMT+01:00 Nelson Elhage notifications@github.com:
The README documents ?readPreference=secondary and mentions doing initial imports against secondaries (mongo calls "slave" nodes secondaries, as of the "new" replication architecture)
— Reply to this email directly or view it on GitHub https://github.com/stripe/mosql/issues/54#issuecomment-52951158.
I'm trying to query a secondary server and it does not let me query it, the error is
Is there a way to tell to mosql to set that thing? (It's just rs.slaveOK() from the cli really). Thanks