[SERVER-27825] minor_version_upgrade_replset.js should handle exceptions from isFinished() while primary is stepping down Created: 26/Jan/17  Updated: 06/Dec/22  Resolved: 14/Apr/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2017-02-13, Repl 2017-03-06
Participants:
Linked BF Score: 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;
}



 Comments   
Comment by Benety Goh [ 14/Feb/17 ]

was not able to reproduce this issue. not convinced that I diagnosed the root cause of the build failure correctly

Generated at Thu Feb 08 04:16:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.