diff options
author | Benety Goh <benety@mongodb.com> | 2019-04-25 06:00:55 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2019-04-25 06:01:09 -0400 |
commit | 2cdcd89eee6cb4742cd2ded11ba91c2db910226c (patch) | |
tree | b8ed945b710aaac9f37831c98682f74d0f712318 /src/mongo/db | |
parent | 7875e210aff618934a46165869a69f8530cf532d (diff) | |
download | mongo-2cdcd89eee6cb4742cd2ded11ba91c2db910226c.tar.gz |
SERVER-40809 TransactionParticipant::OplogSlotReserver gets optimes from LocalOplogInfo
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/db/transaction_participant.cpp | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript index 29629102616..13d0e9f766c 100644 --- a/src/mongo/db/SConscript +++ b/src/mongo/db/SConscript @@ -740,6 +740,7 @@ env.Library( ], LIBDEPS=[ 'commands/txn_cmd_request', + 'repl/local_oplog_info', 'repl/oplog_entry', 'repl/oplog_shim', 'session_catalog', diff --git a/src/mongo/db/transaction_participant.cpp b/src/mongo/db/transaction_participant.cpp index 17d0d4654e6..69ca1054be3 100644 --- a/src/mongo/db/transaction_participant.cpp +++ b/src/mongo/db/transaction_participant.cpp @@ -52,6 +52,7 @@ #include "mongo/db/op_observer.h" #include "mongo/db/ops/update.h" #include "mongo/db/query/get_executor.h" +#include "mongo/db/repl/local_oplog_info.h" #include "mongo/db/repl/repl_client_info.h" #include "mongo/db/repl/storage_interface.h" #include "mongo/db/retryable_writes_stats.h" @@ -606,7 +607,8 @@ TransactionParticipant::OplogSlotReserver::OplogSlotReserver(OperationContext* o // Begin a new WUOW and reserve a slot in the oplog. WriteUnitOfWork wuow(opCtx); - _oplogSlots = repl::getNextOpTimes(opCtx, numSlotsToReserve); + auto oplogInfo = repl::LocalOplogInfo::get(opCtx); + _oplogSlots = oplogInfo->getNextOpTimes(opCtx, numSlotsToReserve); // Release the WUOW state since this WUOW is no longer in use. wuow.release(); |