-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Environment:db version v1.5.7-pre-, pdfile version 4.5
Wed Jul 28 10:21:31 git version: df83eb6beb559d64b941c12edd8da854166cb031
The member initializing the set always seems to be elected master, even if other members have higher priority.
e.g., start three members on 27017, 27018, & 27019 and do:
> rs.initiate({_id:"unicomplex", members:[{_id:0,host:"ubuntu:27017", priority:1}, {_id:1, host:"ubuntu:27018", priority:2}, {_id:2, host:"ubuntu:27019", priority:3}]})
then:
> db.isMaster()
{
"ismaster" : true,
"secondary" : false,
"msg" : "replica sets in alpha, do not use in production. v1.5.6=alpha",
"hosts" : [
"ubuntu:27017",
"ubuntu:27019",
"ubuntu:27018"
],
"ok" : 1
}