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

Setting FCV 3.4 on a 3.6 primary kills 3.4 secondaries

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.0-rc4
    • Affects Version/s: None
    • Component/s: Replication, Storage
    • None
    • Fully Compatible
    • ALL
    • Hide
      (function() {
          // Start a 1-node replica set with a 3.6 node.
          let rst = ReplSetTest({nodes: [{binVersion: "latest"}]});
          rst.startSet();
      
          // Change catchUpTimeoutMillis to a value 3.4 will understand.
          let replSetConfig = rst.getReplSetConfig();
          replSetConfig.settings = {catchUpTimeoutMillis: 2000};
          rst.initiate(replSetConfig);
      
          // Set FCV to 3.4 so that a 3.4 node can join the set.
          let primary = rst.getPrimary()
          assert.commandWorked(primary.adminCommand({setFeatureCompatibilityVersion: "3.4"}));
      
          // Add a 3.4 node to the set.
          let secondary = rst.add({binVersion: "3.4"});
          rst.reInitiate();
      
          // Ensure the 3.4 node succeeded its initial sync.
          assert.writeOK(primary.getDB("test").coll.insert({awaitRepl: true}, {writeConcern: {w: 2}}));
      
          // Run {setFCV: "3.4"}. This should be idempotent.
          assert.adminCommandWorkedAllowingNetworkError(primary, {setFeatureCompatibilityVersion: "3.4"});
      
          // The 3.4 node crashes due to replicating the targetVersion.
          assert.soon(function() {
              try {
                  secondary.adminCommand({ping: 1});
              } catch (e) {
                  return true;
              }
              return false;
          });
          rst.stop(secondary, undefined, {allowedExitCode: MongoRunner.EXIT_ABRUPT});
          rst.stopSet();
      })();
      
      Show
      (function() { // Start a 1-node replica set with a 3.6 node. let rst = ReplSetTest({nodes: [{binVersion: "latest" }]}); rst.startSet(); // Change catchUpTimeoutMillis to a value 3.4 will understand. let replSetConfig = rst.getReplSetConfig(); replSetConfig.settings = {catchUpTimeoutMillis: 2000}; rst.initiate(replSetConfig); // Set FCV to 3.4 so that a 3.4 node can join the set. let primary = rst.getPrimary() assert .commandWorked(primary.adminCommand({setFeatureCompatibilityVersion: "3.4" })); // Add a 3.4 node to the set. let secondary = rst.add({binVersion: "3.4" }); rst.reInitiate(); // Ensure the 3.4 node succeeded its initial sync. assert .writeOK(primary.getDB( "test" ).coll.insert({awaitRepl: true }, {writeConcern: {w: 2}})); // Run {setFCV: "3.4" }. This should be idempotent. assert .adminCommandWorkedAllowingNetworkError(primary, {setFeatureCompatibilityVersion: "3.4" }); // The 3.4 node crashes due to replicating the targetVersion. assert .soon(function() { try { secondary.adminCommand({ping: 1}); } catch (e) { return true ; } return false ; }); rst.stop(secondary, undefined, {allowedExitCode: MongoRunner.EXIT_ABRUPT}); rst.stopSet(); })();
    • Storage 2017-11-13

      Running {setFeatureCompatibilityVersion: "3.4"} on a 3.6 primary replicates the targetVersion to 3.4 secondaries, causing them to crash. This should not happen if the featureCompatibilityVersion is already 3.4.

            Assignee:
            xiangyu.yao@mongodb.com Xiangyu Yao (Inactive)
            Reporter:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: