summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/session_catalog_migration_source.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-09-27 06:05:54 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-10-08 02:38:48 -0400
commitb272bf351c39677d1e87d5c7fcd8b15b61465012 (patch)
tree9a92c09de2c9eb4244ca4b97d320f9d1e70637af /src/mongo/db/s/session_catalog_migration_source.cpp
parent07066a49b935a538ed54716fdd9a98d40c31fba4 (diff)
downloadmongo-b272bf351c39677d1e87d5c7fcd8b15b61465012.tar.gz
SERVER-36799 Move all transactions and retryable writes functionality from Session into TransactionParticipant
This change leaves the Session class to be a plain decorable structure only used for serialization of operations on the same logical session.
Diffstat (limited to 'src/mongo/db/s/session_catalog_migration_source.cpp')
-rw-r--r--src/mongo/db/s/session_catalog_migration_source.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mongo/db/s/session_catalog_migration_source.cpp b/src/mongo/db/s/session_catalog_migration_source.cpp
index 6e1ffc21134..9835843a9aa 100644
--- a/src/mongo/db/s/session_catalog_migration_source.cpp
+++ b/src/mongo/db/s/session_catalog_migration_source.cpp
@@ -40,6 +40,7 @@
#include "mongo/db/session.h"
#include "mongo/db/session_txn_record_gen.h"
#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction_participant.h"
#include "mongo/db/write_concern.h"
#include "mongo/platform/random.h"
#include "mongo/stdx/memory.h"
@@ -106,14 +107,14 @@ repl::OplogEntry makeOplogEntry(repl::OpTime opTime,
* Creates a special "write history lost" sentinel oplog entry.
*/
repl::OplogEntry makeSentinelOplogEntry(OperationSessionInfo sessionInfo, Date_t wallClockTime) {
- return makeOplogEntry({}, // optime
- hashGenerator.nextInt64(), // hash
- repl::OpTypeEnum::kNoop, // op type
- {}, // o
- Session::kDeadEndSentinel, // o2
- sessionInfo, // session info
- wallClockTime, // wall clock time
- kIncompleteHistoryStmtId); // statement id
+ return makeOplogEntry({}, // optime
+ hashGenerator.nextInt64(), // hash
+ repl::OpTypeEnum::kNoop, // op type
+ {}, // o
+ TransactionParticipant::kDeadEndSentinel, // o2
+ sessionInfo, // session info
+ wallClockTime, // wall clock time
+ kIncompleteHistoryStmtId); // statement id
}
} // namespace