diff options
author | Judah Schvimer <judah@mongodb.com> | 2020-07-15 17:23:47 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-24 13:33:48 +0000 |
commit | ca39dac5d6a8316787141d13bcd05261042f6540 (patch) | |
tree | 8f8ea5148cb7b7677ba9cd9bf4c91ae841a13954 /src | |
parent | 59673a165ff8112bcf4e97f1a188deccc3368a9a (diff) | |
download | mongo-ca39dac5d6a8316787141d13bcd05261042f6540.tar.gz |
SERVER-49924 SERVER-49527 recoverFromOplogAsStandalone does not relax index constraints
(cherry picked from commit e0cde43310e5dab3fcf6e93bb115259e70a165e8)
(cherry picked from commit b855c38dc4eaba412df8c195c6e00a569cf47d2a)
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index 886a4d29dd7..994179deced 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -2903,6 +2903,9 @@ bool ReplicationCoordinatorImpl::isInPrimaryOrSecondaryState_UNSAFE() const { bool ReplicationCoordinatorImpl::shouldRelaxIndexConstraints(OperationContext* opCtx, const NamespaceString& ns) { + if (ReplSettings::shouldRecoverFromOplogAsStandalone()) { + return true; + } return !canAcceptWritesFor(opCtx, ns); } |