Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27825

minor_version_upgrade_replset.js should handle exceptions from isFinished() while primary is stepping down

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Replication
    • 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;
      }
      
      

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: