diff options
author | Ethan Zhang <ethan.zhang@mongodb.com> | 2021-08-26 14:36:27 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-26 14:59:08 +0000 |
commit | 4e9b578e87af2f517814a0161eea73c5cb042eb1 (patch) | |
tree | 97ddb992c0259b82619afff9be89e3da7b471ee9 /src/mongo/db/update | |
parent | 789c686a8c6d5d05f501406d54c611bca1266e6e (diff) | |
download | mongo-4e9b578e87af2f517814a0161eea73c5cb042eb1.tar.gz |
SERVER-51075: Remove FCV checks for :2 oplog entries
Diffstat (limited to 'src/mongo/db/update')
-rw-r--r-- | src/mongo/db/update/update_driver.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/mongo/db/update/update_driver.cpp b/src/mongo/db/update/update_driver.cpp index 0af1f5739e0..1826267443d 100644 --- a/src/mongo/db/update/update_driver.cpp +++ b/src/mongo/db/update/update_driver.cpp @@ -265,18 +265,7 @@ Status UpdateDriver::update(OperationContext* opCtx, invariant(!modifiedPaths || modifiedPaths->empty()); if (_logOp && logOpRec) { - const auto& fcvState = serverGlobalParams.featureCompatibility; - - // Updates may be run as part of the startup sequence, before the global FCV state has been - // initialized. We conservatively do not permit the use of $v:2 oplog entries in these - // situations. - - // TODO SERVER-51075: Remove FCV check for $v:2 delta oplog entries. - const bool fcvAllowsV2Entries = fcvState.isVersionInitialized() && - fcvState.isGreaterThanOrEqualTo( - ServerGlobalParams::FeatureCompatibility::Version::kVersion47); - - applyParams.logMode = fcvAllowsV2Entries && internalQueryEnableLoggingV2OplogEntries.load() + applyParams.logMode = internalQueryEnableLoggingV2OplogEntries.load() ? ApplyParams::LogMode::kGenerateOplogEntry : ApplyParams::LogMode::kGenerateOnlyV1OplogEntry; |