diff options
author | Benety Goh <benety@mongodb.com> | 2019-05-16 17:36:53 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2019-05-16 17:37:04 -0400 |
commit | e97e5a966d5a77c27a44a8e01a18a8c2e593e25e (patch) | |
tree | 3c1aee9e2bff959a1910a95cf41780f9d3fb44c9 /src | |
parent | def60324bcffaa8ec1dab8da46b7cb30999a3131 (diff) | |
download | mongo-e97e5a966d5a77c27a44a8e01a18a8c2e593e25e.tar.gz |
SERVER-40728 remove unused function logCommitForUnpreparedTransaction()
last reference was removed in commit 5a6422ce9f4ad85efd1d6b26949ee43e6c1bcda9
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/op_observer_impl.cpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/mongo/db/op_observer_impl.cpp b/src/mongo/db/op_observer_impl.cpp index cc988a2ee4f..12109111f1b 100644 --- a/src/mongo/db/op_observer_impl.cpp +++ b/src/mongo/db/op_observer_impl.cpp @@ -1351,53 +1351,6 @@ void logCommitOrAbortForTransaction(OperationContext* opCtx, }); } -// This is used only for multi-oplog-entry unprepared transactions -// TODO (SERVER-40728) Remove this unused function. -repl::OpTime logCommitForUnpreparedTransaction(OperationContext* opCtx, - StmtId stmtId, - const repl::OpTime& prevOpTime, - const OplogSlot oplogSlot, - const unsigned long long numInTxnOps) { - const NamespaceString cmdNss{"admin", "$cmd"}; - - const auto wallClockTime = getWallClockTimeForOpLog(opCtx); - - OperationSessionInfo sessionInfo; - repl::OplogLink oplogLink; - CommitTransactionOplogObject cmdObj; - sessionInfo.setSessionId(*opCtx->getLogicalSessionId()); - sessionInfo.setTxnNumber(*opCtx->getTxnNumber()); - oplogLink.prevOpTime = prevOpTime; - cmdObj.setPrepared(false); - cmdObj.setCount(numInTxnOps); - - const auto oplogOpTime = logOperation(opCtx, - "c", - cmdNss, - {} /* uuid */, - cmdObj.toBSON(), - nullptr /* o2 */, - false /* fromMigrate */, - wallClockTime, - sessionInfo, - stmtId, - oplogLink, - false /* prepare */, - oplogSlot); - // In the present implementation, a reserved oplog slot is always provided. However that - // is not enforced at this level. - invariant(oplogSlot.isNull() || oplogSlot == oplogOpTime); - - onWriteOpCompleted(opCtx, - cmdNss, - {stmtId}, - oplogOpTime, - wallClockTime, - DurableTxnStateEnum::kCommitted, - boost::none /* startOpTime */); - - return oplogSlot; -} } // namespace void OpObserverImpl::onUnpreparedTransactionCommit( |