I have a replica set with two secondaries. These secondaries are not meant for failover, they are backups of the master, one of them with a delay of 1 day. I've set them both to hidden=true
and priority=0
rs.conf().members
on the master yields
[
{
"_id" : 0,
"host" : "localhost:4000",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : false,
"priority" : 1,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
},
{
"_id" : 1,
"host" : "localhost:4001",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : true,
"priority" : 0,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
},
{
"_id" : 2,
"host" : "localhost:4002",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : true,
"priority" : 0,
"tags" : {
},
"slaveDelay" : NumberLong(86400),
"votes" : 1
}
]
I want to check their content, mainly to issue .count()
queries.
Is it safe to call rs.slaveOk()
on those secondaries?