[SERVER-35556] Replication generic upgrade/downgrade references Created: 12/Jun/18  Updated: 29/Oct/23  Resolved: 02/Jul/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.1.1

Type: Improvement Priority: Major - P3
Reporter: Pavithra Vetriselvan Assignee: Blake Oler
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-35118 Enumerate and remove Replication-rela... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-07-02, Sharding 2018-07-16
Participants:

 Description   

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!



 Comments   
Comment by Blake Oler [ 02/Jul/18 ]

Author:

{'username': 'BlakeIsBlake', 'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com'}

Message: SERVER-35655 Update FCV constants throughout server code.
SERVER-35169 Bump wire protocol version for 4.2.
SERVER-35752 Ensure tests that rely on FCV pass after updating FCV constants.
SERVER-35163 Unblacklist tests that expect FCV version to differ between "last-stable" and "latest."
SERVER-34984 Update major_version_upgrade.js to call setFCV to the latest FCV.
SERVER-35656 Ensure a 4.0 mongos crashes upon attempting to connect to an FCV 4.2 cluster.
SERVER-35404 Re-enable the sharding_last_stable_mongos_and_mixed_shards suite.
Branch: master
https://github.com/mongodb/mongo/commit/53a34c4f01d6b18df4c4800df9a72b1eff07fb6a

Comment by Spencer Brody (Inactive) [ 13/Jun/18 ]

This all looks like general upgrade/downgrade code that is intended to live on between versions for every upgrade/downgrade process. The only work here to do is switch the FCV constants to the new version's values. I believe this process is being owned by the sharding team in 4.2, so sending this to them for triage.

Generated at Thu Feb 08 04:40:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.