diff options
author | Vesselina Ratcheva <vesselina.ratcheva@10gen.com> | 2020-07-15 20:03:46 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-15 21:22:04 +0000 |
commit | b52de8036887396dec91c32b531790e7b1fe01cc (patch) | |
tree | d4fdabdb0ec2df911727c19ecd3e341323b1d633 /src | |
parent | ccb6a8f132dd7de2ae614f339d0e6feec89e8ef2 (diff) | |
download | mongo-b52de8036887396dec91c32b531790e7b1fe01cc.tar.gz |
Revert "SERVER-48525 Forbid dropping config.transactions when there are prepared transactions"
This reverts commit 7e4402baf44531acabfe4a58c7be61c478c46bac.
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/op_observer_impl.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/mongo/db/op_observer_impl.cpp b/src/mongo/db/op_observer_impl.cpp index 78b15ad003e..bb935f1cfb7 100644 --- a/src/mongo/db/op_observer_impl.cpp +++ b/src/mongo/db/op_observer_impl.cpp @@ -778,22 +778,6 @@ repl::OpTime OpObserverImpl::onDropCollection(OperationContext* opCtx, if (collectionName.coll() == DurableViewCatalog::viewsCollectionName()) { DurableViewCatalog::onSystemViewsCollectionDrop(opCtx, collectionName); } else if (collectionName == NamespaceString::kSessionTransactionsTableNamespace) { - // Disallow this drop if there are currently prepared transactions. - const auto sessionCatalog = SessionCatalog::get(opCtx); - SessionKiller::Matcher matcherAllSessions( - KillAllSessionsByPatternSet{makeKillAllSessionsByPattern(opCtx)}); - bool noPreparedTxns = true; - sessionCatalog->scanSessions(matcherAllSessions, [&](const ObservableSession& session) { - auto txnParticipant = TransactionParticipant::get(session); - if (txnParticipant.transactionIsPrepared()) { - noPreparedTxns = false; - } - }); - uassert(4852500, - "Unable to drop transactions table (config.transactions) while prepared " - "transactions are present.", - noPreparedTxns); - MongoDSessionCatalog::invalidateAllSessions(opCtx); } else if (collectionName == NamespaceString::kConfigSettingsNamespace) { ReadWriteConcernDefaults::get(opCtx).invalidate(); |