我有一个带有两个辅助副本的副本集。这些辅助设备不用于故障转移,它们是主设备的备份,其中一个延迟1天。我已将它们设置为hidden=true
和priority=0
rs.conf().members
[
{
"_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
}
]
我想查看其内容,主要是发出.count()
次查询。
在这些辅助词上调用rs.slaveOk()
是否安全?