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

Replication generic upgrade/downgrade references

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.1
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Fully Compatible
    • Sharding 2018-07-02, Sharding 2018-07-16

      REPL CODE:

      initial_syncer.cpp: The following code ensures that the FCV is not in an upgrading/downgrading state during initial sync and does not change over the course of the initial sync? It should be changed to reflect the new upgrade/downgrade constants.

          // Changing the featureCompatibilityVersion during initial sync is unsafe.
          if (version > ServerGlobalParams::FeatureCompatibility::Version::kFullyDowngradedTo36 &&
              version < ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo40) {
              onCompletionGuard->setResultAndCancelRemainingWork_inlock(
                  lock,
                  Status(ErrorCodes::IncompatibleServerVersion,
                         str::stream() << "Sync source had unsafe feature compatibility version: "
                                       << FeatureCompatibilityVersionParser::toString(version)));
              return;
          }
      

      Doing so might break initial_syncer_test.cpp

      replication_coordinator_impl.cpp: The following code initializes the FCV to the latest value for arbiters.

          // Initializes the featureCompatibilityVersion to the latest value, because arbiters do not
          // receive the replicated version. This is to avoid bugs like SERVER-32639.
          if (newState.arbiter()) {
              serverGlobalParams.featureCompatibility.setVersion(
                  ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo40);
          }
      

      sync_tail_test_fixture.cpp: bump generic FCV reference

          // Initialize the featureCompatibilityVersion server parameter. This is necessary because this
          // test fixture does not create a featureCompatibilityVersion document from which to initialize
          // the server parameter.
          serverGlobalParams.featureCompatibility.setVersion(
              ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo40);
      

      REPL JS TESTS:
      initial_sync_fcv.js: this test uses variables 'lastStableFCV' and 'latestFCV' to test that changing the FCV during an initial sync causes it to restart. We should change those variables to the current FCV versions.

      a couple tests depends on 'jstests/libs/feature_compatibility_version.js' so changing the latestFCV/lastStableFCV there should work!

            Assignee:
            blake.oler@mongodb.com Blake Oler
            Reporter:
            pavithra.vetriselvan@mongodb.com Pavithra Vetriselvan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: