ok, i can reproduce the error quite simply.
tst:PRIMARY> rs.config()
{
"_id" : "tst",
"version" : 1,
"members" : [
{
"_id" : 0,
"priority" : 10
},
{
"_id" : 1,
"priority" : 5
},
{
"_id" : 2,
"arbiterOnly" : true
}
]
}
The Test just writes Data into one collection... and reads it with a different one.
As soon as I kill node number 2 - the writing proccess freezes during the write - for minutes! Nothing happens. When I start node 2 again, everything works fine.
This test worked with Driver Version 2.11.x fine - when killing node #2, there sometimes was a read error (exception) but, it continued...
I set the logging Level of com.mongodb to ALL, but it's not telling very much:
pr 25, 2014 9:30:57 PM com.mongodb.MultiServerCluster invalidateOldPrimaries
21:30:58,212 INFO [main] FailoverTests: reading...101
21:30:58,212 INFO [main] FailoverTests: Write Errors now: 0
21:30:59,214 INFO [main] FailoverTests: reading...101
21:30:59,214 INFO [main] FailoverTests: Write Errors now: 0
21:31:00,218 INFO [main] FailoverTests: reading...101
21:31:00,218 INFO [main] FailoverTests: Write Errors now: 0
21:31:01,220 INFO [main] FailoverTests: reading...101
21:31:01,220 INFO [main] FailoverTests: Write Errors now: 0
21:31:02,222 INFO [main] FailoverTests: reading...101
21:31:02,222 INFO [main] FailoverTests: Write Errors now: 0
Apr 25, 2014 9:31:02 PM com.mongodb.MultiServerCluster invalidateOldPrimaries
This is happening, wenn killing node 2... But the message is plain wrong: node two is on port 27018 and never was primary, the primary did not change!
When bringing up node #2 again, this is logged:
Apr 25, 2014 9:33:06 PM com.mongodb.ServerStateNotifier run
Information: Monitor thread successfully connected to server with description ServerDescription{address=127.0.0.1:27018, type=ReplicaSetSecondary, hosts=[127.0.0.1:27017, 127.0.0.1:27018], passives=[], arbiters=[127.0.0.1:27019], primary='null', maxDocumentSize=16777216, maxMessageSize=48000000, maxWriteBatchSize=1000, tags={}, setName='tst', setVersion='1', averagePingTimeNanos=472000, ok=true, state=Connected, version=ServerVersion{versionList=[2, 6, 0]}, minWireVersion=0, maxWireVersion=2} Apr 25, 2014 9:33:07 PM com.mongodb.MultiServerCluster invalidateOldPrimaries
Even when all nodes are up, the message still appears:
Apr 25, 2014 9:34:07 PM com.mongodb.MultiServerCluster invalidateOldPrimaries
When I kill node 1 - the primary node - i get these exceptions:
com.mongodb.MongoServerSelectionException: Unable to connect to any server that matches {serverSelectors=[ReadPreferenceServerSelector{readPreference=primary}, LatencyMinimizingServerSelector{acceptableLatencyDifference=15 ms}]}