[MongoDB]: Why we need to set rs.slaveOk() while querying on secondaries.
The reason for issuing rs.slaveOk() or db.getMongo().setSlaveOk() command while querying on secondaries. We’ve to set “slave okay” mode to let the mongo shell know that we’re allowing reads from a secondary. This is to protect our applications from performing eventually consistent…