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

Make ReplSetTest smarter about voter limits

    • Server Tooling & Methods

      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-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            jonathan.abrahams Jonathan Abrahams
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: