brooklyncentral/brooklyn — pull request #1125 by sjcorbett (2013-12-20 18:39:12+00:00)
Title: Up to twelve members of MongoDB replica sets

Important points:
* Updates the version of MongoDB we use from 2.2.4 to 2.5.4. The 2.5.4 release is a development release, not intended for production, but I believe 2.6 will be released shortly and the upgrade will be simple. 2.5.4 has been much more stable on start-up on my Mac than 2.2.4 ever was.
* Replica sets may have up to twelve members. Sets with an even number of members will have an odd number of voters. The primary member is ensured a vote.
* The set the server is a member of is set as a config key and can be accessed through the MongoDBServer interface.

Changing the distribution of votes in a replica set has the mildly annoying side effect of causing the MongoDB Java driver to log a message like this:
```
2013-12-20 18:25:36,161 DEBUG b.e.n.m.MongoDBClientSupport [pool-13-thread-1]: Reconfiguring replica set to: { "replSetReconfig" : { "_id" : "test-rs-master-write-secondary-read" , "version" : 3 , "members" : [ { "_id" : 0 , "host" : "sams.home:27018" , "votes" : 1} , { "_id" : 2 , "host" : "sams.home:27019" , "votes" : 1} , { "_id" : 3 , "host" : "sams.home:27017" , "votes" : 1}]}}
2013-12-20 18:25:36,165 WARN com.mongodb [pool-13-thread-1]: emptying DBPortPool to sams.home/192.168.1.64:27018 b/c of error
java.io.EOFException: null
at org.bson.io.Bits.readFully(Bits.java:48) ~[mongo-java-driver-2.11.3.jar:na]
[...]
```
See [this comment](https://github.com/sjcorbett/brooklyn/commit/6578ad4abf1df231c1ffd824c84df871f957f62d#diff-1a231e533aaee815032c5b958a85ff3cR173) for an explanation.