全部博文(137)
分类: 数据库开发技术
2011-06-23 12:54:51
Each member can be configured to have any of the following options.
Command | Default | Description | Min Version |
---|---|---|---|
arbiterOnly | false | If true, this member will participate in vote but receive no data. | 1.6 |
buildIndexes | true | When false, prevent secondary indexes from being created on this member. This is typically used on machines that are pure "backup" machines that are never queried. By not having the secondary indexes, the member performs less works on writes and requires less ram. Note the _id index is still created. Can only be set to false if priority:0. It is rare to use this option. | 1.6 |
hidden | false | If true, do not advertise the member's existence to clients in isMaster command responses. It is rare to use this option. | 1.7 |
priority | 1.0 | Priority of the server for elections. Higher priority servers will be preferred as primary. () | 1.6, 1.9 |
tags | [] | An array of strings representing the location of this server. These can be used for location-aware write guarantees, see | 1.9.1 |
slaveDelay | 0 | Number of seconds to remain behind the primary. A value of 0 implies "as up-to-date as possible". Used to recover from human errors (e.g.: accidentally dropping a database). Can only be set on members with priority 0. Slave delay members are a great way to keep a rolling backup from a certain amount of time in the past. |
1.6.3 |
votes | 1 | Number of votes this member has in an election. Generally you should not change this. () | 1.6 |