diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2017-07-24 15:52:16 -0400 |
---|---|---|
committer | Jack Mulrow <jack.mulrow@mongodb.com> | 2017-07-31 14:18:29 -0400 |
commit | 0a55ace0a362a5944fedbaec2d95b2d7cda750d6 (patch) | |
tree | fe13ddca99d37111ec5f7f32fc66146d82106d5f /src/mongo/db/repl/idempotency_test_fixture.cpp | |
parent | f305e8262eb4403e2ca1aaf7a5fa9adf9a80fdc7 (diff) | |
download | mongo-0a55ace0a362a5944fedbaec2d95b2d7cda750d6.tar.gz |
SERVER-30262 Update session info during batch apply in secondaries
Diffstat (limited to 'src/mongo/db/repl/idempotency_test_fixture.cpp')
-rw-r--r-- | src/mongo/db/repl/idempotency_test_fixture.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/db/repl/idempotency_test_fixture.cpp b/src/mongo/db/repl/idempotency_test_fixture.cpp index fd0495e12a4..d4848b36ba2 100644 --- a/src/mongo/db/repl/idempotency_test_fixture.cpp +++ b/src/mongo/db/repl/idempotency_test_fixture.cpp @@ -44,6 +44,7 @@ #include "mongo/db/curop.h" #include "mongo/db/db_raii.h" #include "mongo/db/jsobj.h" +#include "mongo/db/logical_session_id.h" #include "mongo/db/query/internal_plans.h" #include "mongo/db/repl/bgsync.h" #include "mongo/db/repl/drop_pending_collection_reaper.h" @@ -209,6 +210,17 @@ OplogEntry makeCreateIndexOplogEntry(OpTime opTime, opTime, NamespaceString(nss.getSystemIndexesCollection()), indexInfoBob.obj()); } +void appendSessionTransactionInfo(OplogEntry& entry, + LogicalSessionId lsid, + TxnNumber txnNum, + StmtId stmtId) { + auto info = entry.getOperationSessionInfo(); + info.setSessionId(lsid); + info.setTxnNumber(txnNum); + entry.setOperationSessionInfo(std::move(info)); + entry.setStatementId(stmtId); +} + Status IdempotencyTest::runOp(const OplogEntry& op) { return runOps({op}); } |