replSetReconfig command asserts when one of the members has a priority setting

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.7.6
    • Component/s: Replication, Shell
    • ALL
    • Hide
      var replSet = new ReplSetTest({ name: 'reconfig', nodes: 3 });
      replSet.startSet({nojournal: "" });
      replSet.initiate();
      var primary = replSet.getPrimary();
      var conf = primary.getDB("local").system.replset.findOne();
      conf.members[0].priority = 100;
      conf.version++;
      primary.adminCommand({replSetReconfig: conf});
      
      Show
      var replSet = new ReplSetTest({ name: 'reconfig' , nodes: 3 }); replSet.startSet({nojournal: "" }); replSet.initiate(); var primary = replSet.getPrimary(); var conf = primary.getDB( "local" ).system.replset.findOne(); conf.members[0].priority = 100; conf.version++; primary.adminCommand({replSetReconfig: conf});
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      If the command replSetReconfig is invoked with a member that has a priority setting, the command throws an error:

      2014-09-12T13:12:10.609-0400 I QUERY Error: error doing query: failed
      at DBQuery._exec (src/mongo/shell/query.js:83:36)
      at DBQuery.hasNext (src/mongo/shell/query.js:114:10)
      at DBCollection.findOne (src/mongo/shell/collection.js:185:19)
      at DB.runCommand (src/mongo/shell/db.js:58:41)
      at Mongo.adminCommand (src/mongo/shell/mongo.js:52:34)
      at reconfigReplSet (/tmp/reconfig_wc.js:11:30)
      at addTagset (/tmp/reconfig_wc.js:35:5)
      at /tmp/reconfig_wc.js:227:1 at src/mongo/shell/collection.js:57

            Assignee:
            Eric Milkie
            Reporter:
            Jonathan Abrahams (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: