-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.1.8
-
Component/s: Testing Infrastructure
-
None
-
Fully Compatible
-
TIG A (10/09/15)
As milkie pointed out, it's possible for the writeConcern write in jstests/concurrency/fsm_libs/cluster.js to fail to run if a failover is occurring and there's no primary:
this.executeOnMongodNodes(function (db) { // Execute on all primary nodes if (db.isMaster().ismaster) { // Insert a document with a writeConcern for all nodes in the replica set to // ensure that all previous workload operations have completed on secondaries var result = db.getSiblingDB('test').fsm_teardown.insert({ a: 1 }, wc); assert.writeOK(result, 'teardown insert failed: ' + tojson(result)); assert(db.getSiblingDB('test').fsm_teardown.drop(), 'teardown drop failed'); } });
We should fail with a clear error message if the branch is not executed at all (because of a transient lack of a primary).