0

I'm unsure of the proper way to use slaveOK with Connections::add(). It was suggested here to use Mongo::setSlaveOkay(), but I'd like it for all queries.

I'm unsure of how to properly test it, but I'd like to think this would work:

Connections::add('mongo', 
    array(
        'type' => 'MongoDb',
        'database' => 'my_app',
        'slaveOk' => true
    )
);
Eric C
  • 971
  • 6
  • 14

1 Answers1

0

For testing - you could always fire up wireshark and see where the requests are going, or check the log of the secondaries in the set to see if they are getting any reads.

shelman
  • 2,689
  • 15
  • 17