diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/catalog/coll_mod.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/catalog/database_impl.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/mongod_main.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/oplog.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_external_state_impl.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/server_options.h | 2 | ||||
-rw-r--r-- | src/mongo/db/views/view_catalog.cpp | 4 |
8 files changed, 14 insertions, 14 deletions
diff --git a/src/mongo/db/catalog/coll_mod.cpp b/src/mongo/db/catalog/coll_mod.cpp index 52653d1c0d1..69c72434180 100644 --- a/src/mongo/db/catalog/coll_mod.cpp +++ b/src/mongo/db/catalog/coll_mod.cpp @@ -234,13 +234,13 @@ StatusWith<CollModRequest> parseCollModRequest(OperationContext* opCtx, } } else if (fieldName == "validator" && !isView) { // If the feature compatibility version is not kLatest, and we are validating features - // as master, ban the use of new agg features introduced in kLatest to prevent them from - // being persisted in the catalog. + // as primary, ban the use of new agg features introduced in kLatest to prevent them + // from being persisted in the catalog. boost::optional<ServerGlobalParams::FeatureCompatibility::Version> maxFeatureCompatibilityVersion; // (Generic FCV reference): This FCV check should exist across LTS binary versions. ServerGlobalParams::FeatureCompatibility::Version fcv; - if (serverGlobalParams.validateFeaturesAsMaster.load() && + if (serverGlobalParams.validateFeaturesAsPrimary.load() && serverGlobalParams.featureCompatibility.isLessThan( ServerGlobalParams::FeatureCompatibility::kLatest, &fcv)) { maxFeatureCompatibilityVersion = fcv; diff --git a/src/mongo/db/catalog/database_impl.cpp b/src/mongo/db/catalog/database_impl.cpp index 62f9198d09f..c29a631ac29 100644 --- a/src/mongo/db/catalog/database_impl.cpp +++ b/src/mongo/db/catalog/database_impl.cpp @@ -887,11 +887,11 @@ Status DatabaseImpl::userCreateNS(OperationContext* opCtx, new ExpressionContext(opCtx, std::move(collator), nss)); // If the feature compatibility version is not kLatest, and we are validating features as - // master, ban the use of new agg features introduced in kLatest to prevent them from being + // primary, ban the use of new agg features introduced in kLatest to prevent them from being // persisted in the catalog. // (Generic FCV reference): This FCV check should exist across LTS binary versions. ServerGlobalParams::FeatureCompatibility::Version fcv; - if (serverGlobalParams.validateFeaturesAsMaster.load() && + if (serverGlobalParams.validateFeaturesAsPrimary.load() && serverGlobalParams.featureCompatibility.isLessThan( ServerGlobalParams::FeatureCompatibility::kLatest, &fcv)) { expCtx->maxFeatureCompatibilityVersion = fcv; diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index ba18280bddd..f25af90899b 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -680,7 +680,7 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) { } if (replSettings.usingReplSets() || !gInternalValidateFeaturesAsPrimary) { - serverGlobalParams.validateFeaturesAsMaster.store(false); + serverGlobalParams.validateFeaturesAsPrimary.store(false); } } diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index fe3ab76dc71..8ef9e59bb1a 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -1332,7 +1332,7 @@ Status applyOperation_inlock(OperationContext* opCtx, if (updateMod.type() == write_ops::UpdateModification::Type::kDelta) { // If we are validating features as primary, only allow $v:2 delta entries if we are // at FCV 4.7 or newer to prevent them from being written to the oplog. - if (serverGlobalParams.validateFeaturesAsMaster.load()) { + if (serverGlobalParams.validateFeaturesAsPrimary.load()) { uassert(4773100, "Delta oplog entries may not be used in FCV below 4.7", serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo( diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp index 602e100c907..feef90d04e8 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp @@ -550,8 +550,8 @@ OpTime ReplicationCoordinatorExternalStateImpl::onTransitionToPrimary(OperationC notifyFreeMonitoringOnTransitionToPrimary(); - // It is only necessary to check the system indexes on the first transition to master. - // On subsequent transitions to master the indexes will have already been created. + // It is only necessary to check the system indexes on the first transition to primary. + // On subsequent transitions to primary the indexes will have already been created. static std::once_flag verifySystemIndexesOnce; std::call_once(verifySystemIndexesOnce, [opCtx] { const auto globalAuthzManager = AuthorizationManager::get(opCtx->getServiceContext()); @@ -560,7 +560,7 @@ OpTime ReplicationCoordinatorExternalStateImpl::onTransitionToPrimary(OperationC } }); - serverGlobalParams.validateFeaturesAsMaster.store(true); + serverGlobalParams.validateFeaturesAsPrimary.store(true); return opTimeToReturn; } diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index 080b3f0e577..87c7e7acbda 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -4035,7 +4035,7 @@ ReplicationCoordinatorImpl::_updateMemberStateFromTopologyCoordinator(WithLock l // _canAcceptNonLocalWrites should already be set. invariant(!_readWriteAbility->canAcceptNonLocalWrites(lk)); - serverGlobalParams.validateFeaturesAsMaster.store(false); + serverGlobalParams.validateFeaturesAsPrimary.store(false); result = (newState.removed() || newState.rollback()) ? kActionRollbackOrRemoved : kActionSteppedDown; } else { diff --git a/src/mongo/db/server_options.h b/src/mongo/db/server_options.h index 17c6f79d7cb..eb308da43d6 100644 --- a/src/mongo/db/server_options.h +++ b/src/mongo/db/server_options.h @@ -310,7 +310,7 @@ struct ServerGlobalParams { // primaries can accept user-initiated writes and validate based on the feature compatibility // version. A secondary always validates in the upgraded mode so that it can sync new features, // even when in the downgraded feature compatibility mode. - AtomicWord<bool> validateFeaturesAsMaster{true}; + AtomicWord<bool> validateFeaturesAsPrimary{true}; std::vector<std::string> disabledSecureAllocatorDomains; diff --git a/src/mongo/db/views/view_catalog.cpp b/src/mongo/db/views/view_catalog.cpp index 2ed8ac9ee17..a6aae261dea 100644 --- a/src/mongo/db/views/view_catalog.cpp +++ b/src/mongo/db/views/view_catalog.cpp @@ -327,11 +327,11 @@ StatusWith<stdx::unordered_set<NamespaceString>> ViewCatalog::_validatePipeline( boost::none); // If the feature compatibility version is not kLatest, and we are validating features as - // master, ban the use of new agg features introduced in kLatest to prevent them from being + // primary, ban the use of new agg features introduced in kLatest to prevent them from being // persisted in the catalog. // (Generic FCV reference): This FCV check should exist across LTS binary versions. ServerGlobalParams::FeatureCompatibility::Version fcv; - if (serverGlobalParams.validateFeaturesAsMaster.load() && + if (serverGlobalParams.validateFeaturesAsPrimary.load() && serverGlobalParams.featureCompatibility.isLessThan( ServerGlobalParams::FeatureCompatibility::kLatest, &fcv)) { expCtx->maxFeatureCompatibilityVersion = fcv; |