WWW.DBVERSITY.COM
WWW.DBVERSITY.COM
Menu
  • Home
  • About us
  • Discussions
  • Login / Register
Welcome to the world of Database Technologies
Browse: Home » [MongoDB]: Why we need to set rs.slaveOk() while querying on secondaries.

[MongoDB]: Why we need to set rs.slaveOk() while querying on secondaries.

June 8, 2015 · by dbversity · in MongoDB

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…

Categories

Categories

Copyright © 2025 WWW.DBVERSITY.COM

Powered by WordPress and Origin