Details
-
Bug
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
-
Replication
-
Fully Compatible
-
ALL
-
Repl 2017-02-13, Repl 2017-03-06
-
0
Description
The function used to generate the insert/find workload catches and handles exceptions from the insert/find() operations. However, isFinished() also runs a find() which may throw an exception if the server is unavailable (e.g. during step-down):
function findAndInsert(rsURL, coll) {
|
var coll = new Mongo(rsURL).getCollection(coll + "");
|
var count = 0;
|
|
|
jsTest.log("Starting finds and inserts...");
|
|
|
while (!isFinished()) {
|
try {
|
coll.insert({_id: count, hello: "world"});
|
assert.eq(null, coll.getDB().getLastError());
|
assert.neq(null, coll.findOne({_id: count}));
|
} catch (e) {
|
printjson(e);
|
}
|
|
|
count++;
|
}
|
|
|
jsTest.log("Finished finds and inserts...");
|
return count;
|
}
|
|