Make ReplSetTest smarter about voter limits

XMLWordPrintableJSON

    • Server Tooling & Methods
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      ReplSetTest can initiate and startup a replica set, but if the number of nodes in the set is greater than the number of voting nodes (currently 7), it will fail. It would be good if one could specify a value for nodes larger than the voting limit, and have replSetTest set the extra nodes to votes to 0 and priority to 0.

      The current workaround is as follows:

      var nodeNum = 15;
      var votingLimit = 7;
      var rs = new ReplSetTest({nodes: nodeNum});
      rs.startSet();
      rsConfig = rs.getReplSetConfig();
      for (var i = votingLimit; i < nodeNum; i++) {
         rsConfig.members[i].votes = 0;
         rsConfig.members[i].priority = 0;
      }
      rs.initiate(rsConfig);
      

            Assignee:
            Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            Jonathan Abrahams (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: