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

Config term does not get initialized until replSetReconfig is run

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.4.0-rc2, 4.7.0
    • Replication
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Hide

      The following test passes:

      (function() {
      "use strict";
      var rst = new ReplSetTest({nodes: 1});
      rst.startSet();
      rst.initiate();
      var node = rst.getPrimary();
      assert(!node.adminCommand({replSetGetConfig: 1}).config.hasOwnProperty("term"));
      assert.commandWorked(node.adminCommand({replSetStepDown: 1, force: true}));
      sleep(2000);
      assert.commandWorked(node.adminCommand({replSetStepUp: 1}));
      assert(!node.adminCommand({replSetGetConfig: 1}).config.hasOwnProperty("term"));
      rst.stopSet();
      })();
      

      Show
      The following test passes: (function() { "use strict"; var rst = new ReplSetTest({nodes: 1}); rst.startSet(); rst.initiate(); var node = rst.getPrimary(); assert(!node.adminCommand({replSetGetConfig: 1}).config.hasOwnProperty("term")); assert.commandWorked(node.adminCommand({replSetStepDown: 1, force: true})); sleep(2000); assert.commandWorked(node.adminCommand({replSetStepUp: 1})); assert(!node.adminCommand({replSetGetConfig: 1}).config.hasOwnProperty("term")); rst.stopSet(); })();
    • Repl 2020-04-06, Repl 2020-04-20
    • 50

    Description

      After SERVER-46571, the initial replica set config term is -1. The replica set config term only gets incremented on stepup if the config term is initialized. Thus the config term does not get initialized until the user runs a replSetReconfig command.

      Attachments

        Issue Links

          Activity

            People

              william.schultz@mongodb.com William Schultz (Inactive)
              tess.avitabile@mongodb.com Tess Avitabile (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: