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

Config term does not get initialized until replSetReconfig is run

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc2, 4.7.0
    • Affects Version/s: None
    • Component/s: 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

      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.

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

              Created:
              Updated:
              Resolved: