I have the following replicaSet:
"members" : [
{
"_id" : 1,
"host" : m1.host
"arbiterOnly" : true
},
{
"_id" : 2,
"host" : m2.host
},
{
"_id" : 3,
"host" : m3.host
}
I am trying to force m2.host get elected every time as primary, after it went offline and back online. I assume that I need to configure member.priority in order to achieve this. I know that you can force a member to become primary, in a "1 primary, 2 secondaries" replicaSet with this:
cfg = rs.conf()
cfg.members[1].priority = ?
cfg.members[2].priority = 1
cfg.members[3].priority = 0.5
rs.reconfig(cfg)
but I don't know if I should I provide a priority for m1.host (ArbiterOnly).