diff options
author | Gregory Noma <gregory.noma@gmail.com> | 2021-03-16 15:26:22 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-16 20:02:29 +0000 |
commit | 133d07b3e9e8dfb2aacb52dc2174bee38d791aec (patch) | |
tree | b9534e2e7722ae853d1bac90ad82b2c11104e0c1 /src/mongo/db/s/session_catalog_migration_destination_test.cpp | |
parent | f7a7901fc4b02e843cb23285ed28d08f14097ca7 (diff) | |
download | mongo-133d07b3e9e8dfb2aacb52dc2174bee38d791aec.tar.gz |
SERVER-55194 Allow multiple statement ids per oplog entry
Diffstat (limited to 'src/mongo/db/s/session_catalog_migration_destination_test.cpp')
-rw-r--r-- | src/mongo/db/s/session_catalog_migration_destination_test.cpp | 143 |
1 files changed, 72 insertions, 71 deletions
diff --git a/src/mongo/db/s/session_catalog_migration_destination_test.cpp b/src/mongo/db/s/session_catalog_migration_destination_test.cpp index 27fce4da3eb..70116c968d9 100644 --- a/src/mongo/db/s/session_catalog_migration_destination_test.cpp +++ b/src/mongo/db/s/session_catalog_migration_destination_test.cpp @@ -88,7 +88,7 @@ repl::OplogEntry makeOplogEntry(repl::OpTime opTime, boost::optional<BSONObj> object2, OperationSessionInfo sessionInfo, Date_t wallClockTime, - boost::optional<StmtId> stmtId, + const std::vector<StmtId>& stmtIds, boost::optional<repl::OpTime> preImageOpTime = boost::none, boost::optional<repl::OpTime> postImageOpTime = boost::none) { return { @@ -104,7 +104,7 @@ repl::OplogEntry makeOplogEntry(repl::OpTime opTime, sessionInfo, // sessionInfo boost::none, // isUpsert wallClockTime, // wall clock time - stmtId, // statement id + stmtIds, // statement ids boost::none, // optime of previous write within same transaction preImageOpTime, // pre-image optime postImageOpTime, // post-image optime @@ -301,8 +301,9 @@ private: const repl::OplogEntry& oplogToCheck) { ASSERT_TRUE(oplogToCheck.getOpType() == OpTypeEnum::kNoop); - ASSERT_TRUE(oplogToCheck.getStatementId()); - ASSERT_EQ(*originalOplog.getStatementId(), *oplogToCheck.getStatementId()); + ASSERT_EQ(originalOplog.getStatementIds().size(), 1); + ASSERT_EQ(oplogToCheck.getStatementIds().size(), 1); + ASSERT_EQ(originalOplog.getStatementIds().front(), oplogToCheck.getStatementIds().front()); const auto origSessionInfo = originalOplog.getOperationSessionInfo(); const auto sessionInfoToCheck = oplogToCheck.getOperationSessionInfo(); @@ -342,7 +343,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OplogEntriesWithSameTxn) { boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids auto oplog2 = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kInsert, // op type @@ -350,7 +351,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OplogEntriesWithSameTxn) { boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids auto oplog3 = makeOplogEntry(OpTime(Timestamp(60, 2), 1), // optime OpTypeEnum::kInsert, // op type @@ -358,7 +359,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OplogEntriesWithSameTxn) { boost::none, // o2 sessionInfo, // sessionInfo Date_t::now(), // wall clock time - 5); // statement id + {5}); // statement ids returnOplog({oplog1, oplog2, oplog3}); @@ -403,7 +404,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldOnlyStoreHistoryOfLatestTxn boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids sessionInfo.setTxnNumber(txnNum++); auto oplog2 = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime @@ -412,7 +413,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldOnlyStoreHistoryOfLatestTxn boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids sessionInfo.setTxnNumber(txnNum); auto oplog3 = makeOplogEntry(OpTime(Timestamp(60, 2), 1), // optime @@ -421,7 +422,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldOnlyStoreHistoryOfLatestTxn boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 5); // statement id + {5}); // statement ids returnOplog({oplog1, oplog2, oplog3}); @@ -457,7 +458,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OplogEntriesWithSameTxnInSeparate boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids auto oplog2 = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kInsert, // op type @@ -465,7 +466,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OplogEntriesWithSameTxnInSeparate boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids auto oplog3 = makeOplogEntry(OpTime(Timestamp(60, 2), 1), // optime OpTypeEnum::kInsert, // op type @@ -473,7 +474,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OplogEntriesWithSameTxnInSeparate boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 5); // statement id + {5}); // statement ids // Return in 2 batches returnOplog({oplog1, oplog2}); @@ -525,7 +526,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OplogEntriesWithDifferentSession) boost::none, // o2 sessionInfo1, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids auto oplog2 = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kInsert, // op type @@ -533,7 +534,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OplogEntriesWithDifferentSession) boost::none, // o2 sessionInfo2, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids auto oplog3 = makeOplogEntry(OpTime(Timestamp(60, 2), 1), // optime OpTypeEnum::kInsert, // op type @@ -541,7 +542,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OplogEntriesWithDifferentSession) boost::none, // o2 sessionInfo2, // session info Date_t::now(), // wall clock time - 5); // statement id + {5}); // statement ids returnOplog({oplog1, oplog2, oplog3}); @@ -604,7 +605,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldNotNestAlreadyNestedOplog) boost::none, // o2 sessionInfo, // session info Date_t(), // wall clock time - 23); // statement id + {23}); // statement ids auto origInnerOplog2 = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kInsert, // op type @@ -612,7 +613,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldNotNestAlreadyNestedOplog) boost::none, // o2 sessionInfo, // session info Date_t(), // wall clock time - 45); // statement id + {45}); // statement ids auto oplog1 = makeOplogEntry(OpTime(Timestamp(1100, 2), 1), // optime OpTypeEnum::kNoop, // op type @@ -620,7 +621,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldNotNestAlreadyNestedOplog) origInnerOplog1.getEntry().toBSON(), // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids auto oplog2 = makeOplogEntry(OpTime(Timestamp(1080, 2), 1), // optime OpTypeEnum::kNoop, // op type @@ -628,7 +629,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldNotNestAlreadyNestedOplog) origInnerOplog2.getEntry().toBSON(), // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids returnOplog({oplog1, oplog2}); @@ -670,7 +671,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandlePreImageFindA boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids auto updateOplog = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kUpdate, // op type @@ -678,7 +679,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandlePreImageFindA BSON("$set" << BSON("x" << 101)), // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45, // statement id + {45}, // statement ids repl::OpTime(Timestamp(100, 2), 1), // pre-image optime boost::none); // post-image optime @@ -698,8 +699,8 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandlePreImageFindA auto nextOplog = historyIter.next(opCtx); ASSERT_TRUE(nextOplog.getOpType() == OpTypeEnum::kNoop); - ASSERT_TRUE(nextOplog.getStatementId()); - ASSERT_EQ(45, nextOplog.getStatementId().value()); + ASSERT_EQ(1, nextOplog.getStatementIds().size()); + ASSERT_EQ(45, nextOplog.getStatementIds().front()); auto nextSessionInfo = nextOplog.getOperationSessionInfo(); @@ -727,8 +728,8 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandlePreImageFindA auto preImageOpTime = nextOplog.getPreImageOpTime().value(); auto newPreImageOplog = getOplog(opCtx, preImageOpTime); - ASSERT_TRUE(newPreImageOplog.getStatementId()); - ASSERT_EQ(45, newPreImageOplog.getStatementId().value()); + ASSERT_EQ(1, newPreImageOplog.getStatementIds().size()); + ASSERT_EQ(45, newPreImageOplog.getStatementIds().front()); auto preImageSessionInfo = newPreImageOplog.getOperationSessionInfo(); @@ -761,7 +762,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandlePostImageFind boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids auto updateOplog = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kUpdate, // op type @@ -769,7 +770,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandlePostImageFind BSON("$set" << BSON("x" << 101)), sessionInfo, // session info Date_t::now(), // wall clock time - 45, // statement id + {45}, // statement ids boost::none, // pre-image optime repl::OpTime(Timestamp(100, 2), 1)); // post-image optime @@ -788,8 +789,8 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandlePostImageFind auto nextOplog = historyIter.next(opCtx); ASSERT_TRUE(nextOplog.getOpType() == OpTypeEnum::kNoop); - ASSERT_TRUE(nextOplog.getStatementId()); - ASSERT_EQ(45, nextOplog.getStatementId().value()); + ASSERT_EQ(1, nextOplog.getStatementIds().size()); + ASSERT_EQ(45, nextOplog.getStatementIds().front()); auto nextSessionInfo = nextOplog.getOperationSessionInfo(); @@ -817,8 +818,8 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandlePostImageFind auto postImageOpTime = nextOplog.getPostImageOpTime().value(); auto newPostImageOplog = getOplog(opCtx, postImageOpTime); - ASSERT_TRUE(newPostImageOplog.getStatementId()); - ASSERT_EQ(45, newPostImageOplog.getStatementId().value()); + ASSERT_EQ(1, newPostImageOplog.getStatementIds().size()); + ASSERT_EQ(45, newPostImageOplog.getStatementIds().front()); auto preImageSessionInfo = newPostImageOplog.getOperationSessionInfo(); @@ -851,7 +852,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandleFindAndModify boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids auto updateOplog = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kUpdate, // op type @@ -859,7 +860,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandleFindAndModify BSON("$set" << BSON("x" << 101)), // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45, // statement id + {45}, // statement ids repl::OpTime(Timestamp(100, 2), 1), // pre-image optime boost::none); @@ -882,8 +883,8 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandleFindAndModify auto nextOplog = historyIter.next(opCtx); ASSERT_TRUE(nextOplog.getOpType() == OpTypeEnum::kNoop); - ASSERT_TRUE(nextOplog.getStatementId()); - ASSERT_EQ(45, nextOplog.getStatementId().value()); + ASSERT_EQ(1, nextOplog.getStatementIds().size()); + ASSERT_EQ(45, nextOplog.getStatementIds().front()); auto nextSessionInfo = nextOplog.getOperationSessionInfo(); @@ -911,8 +912,8 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldBeAbleToHandleFindAndModify auto preImageOpTime = nextOplog.getPreImageOpTime().value(); auto newPreImageOplog = getOplog(opCtx, preImageOpTime); - ASSERT_TRUE(newPreImageOplog.getStatementId()); - ASSERT_EQ(45, newPreImageOplog.getStatementId().value()); + ASSERT_EQ(1, nextOplog.getStatementIds().size()); + ASSERT_EQ(45, newPreImageOplog.getStatementIds().front()); auto preImageSessionInfo = newPreImageOplog.getOperationSessionInfo(); @@ -957,7 +958,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OlderTxnShouldBeIgnored) { boost::none, // o2 oldSessionInfo, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids auto oplog2 = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kInsert, // op type @@ -965,7 +966,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OlderTxnShouldBeIgnored) { boost::none, // o2 oldSessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids returnOplog({oplog1, oplog2}); @@ -1008,7 +1009,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, NewerTxnWriteShouldNotBeOverwritt boost::none, // o2 oldSessionInfo, Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids returnOplog({oplog1}); @@ -1031,7 +1032,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, NewerTxnWriteShouldNotBeOverwritt boost::none, // o2 oldSessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids returnOplog({oplog2}); @@ -1115,7 +1116,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldJoinProperlyForResponseWith boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids returnOplog({oplog}); @@ -1139,7 +1140,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldJoinProperlyForResponseWith boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids returnOplog({oplog}); @@ -1165,7 +1166,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldJoinProperlyForResponseWith boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - boost::none); // statement id + {}); // statement ids returnOplog({oplog}); @@ -1193,7 +1194,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids returnOplog({oplog1}); @@ -1212,7 +1213,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids returnOplog({oplog2}); @@ -1261,7 +1262,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldErrorForConsecutivePreImage boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids auto preImageOplog2 = makeOplogEntry(OpTime(Timestamp(100, 2), 1), // optime OpTypeEnum::kNoop, // op type @@ -1269,7 +1270,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldErrorForConsecutivePreImage boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids returnOplog({preImageOplog1, preImageOplog2}); @@ -1299,7 +1300,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids sessionInfo.setSessionId(makeLogicalSessionIdForTest()); auto updateOplog = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime @@ -1308,7 +1309,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, BSON("$set" << BSON("x" << 101)), sessionInfo, // session info Date_t::now(), // wall clock time - 45, // statement id + {45}, // statement ids repl::OpTime(Timestamp(100, 2), 1), // pre-image optime boost::none); // post-image optime @@ -1340,7 +1341,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldErrorForPreImageOplogWithNo boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids sessionInfo.setTxnNumber(56); auto updateOplog = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime @@ -1349,7 +1350,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldErrorForPreImageOplogWithNo BSON("$set" << BSON("x" << 101)), // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45, // statement id + {45}, // statement ids repl::OpTime(Timestamp(100, 2), 1), // pre-image optime boost::none); // post-image optime @@ -1382,7 +1383,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids auto updateOplog = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kUpdate, // op type @@ -1390,7 +1391,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, BSON("$set" << BSON("x" << 101)), // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids returnOplog({preImageOplog, updateOplog}); @@ -1421,7 +1422,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids auto updateOplog = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kUpdate, // op type @@ -1429,7 +1430,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, BSON("$set" << BSON("x" << 101)), // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45, // statement id + {45}, // statement ids repl::OpTime(Timestamp(100, 2), 1), // pre-image optime boost::none); // post-image optime @@ -1462,7 +1463,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids auto updateOplog = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kUpdate, // op type @@ -1470,7 +1471,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, BSON("$set" << BSON("x" << 101)), // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45, // statement id + {45}, // statement ids boost::none, // pre-image optime repl::OpTime(Timestamp(100, 2), 1)); // post-image optime @@ -1502,7 +1503,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldIgnoreAlreadyExecutedStatem boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 23); // statement id + {23}); // statement ids auto oplog2 = makeOplogEntry(OpTime(Timestamp(70, 2), 1), // optime OpTypeEnum::kInsert, // op type @@ -1510,7 +1511,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldIgnoreAlreadyExecutedStatem boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 30); // statement id + {30}); // statement ids auto oplog3 = makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kInsert, // op type @@ -1518,7 +1519,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldIgnoreAlreadyExecutedStatem boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 45); // statement id + {45}); // statement ids returnOplog({oplog1, oplog2, oplog3}); @@ -1540,8 +1541,8 @@ TEST_F(SessionCatalogMigrationDestinationTest, ShouldIgnoreAlreadyExecutedStatem ASSERT_TRUE(firstInsertOplog.getOpType() == OpTypeEnum::kInsert); ASSERT_BSONOBJ_EQ(BSON("_id" << 46), firstInsertOplog.getObject()); - ASSERT_TRUE(firstInsertOplog.getStatementId()); - ASSERT_EQ(30, *firstInsertOplog.getStatementId()); + ASSERT_EQ(1, firstInsertOplog.getStatementIds().size()); + ASSERT_EQ(30, firstInsertOplog.getStatementIds().front()); checkStatementExecuted(opCtx, 19, 23, oplog1); checkStatementExecuted(opCtx, 19, 30); @@ -1559,14 +1560,14 @@ TEST_F(SessionCatalogMigrationDestinationTest, OplogEntriesWithIncompleteHistory boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 23), // statement id + {23}), // statement ids makeOplogEntry(OpTime(Timestamp(80, 2), 1), // optime OpTypeEnum::kNoop, // op type {}, // o TransactionParticipant::kDeadEndSentinel, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - kIncompleteHistoryStmtId), // statement id + {kIncompleteHistoryStmtId}), // statement ids // This will get ignored since previous entry will make the history 'incomplete'. makeOplogEntry(OpTime(Timestamp(60, 2), 1), // optime OpTypeEnum::kInsert, // op type @@ -1574,7 +1575,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, OplogEntriesWithIncompleteHistory boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - 5)}; // statement id + {5})}; // statement ids SessionCatalogMigrationDestination sessionMigration(kNs, kFromShard, migrationId()); sessionMigration.start(getServiceContext()); @@ -1637,7 +1638,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, boost::none, // o2 sessionInfo1, // session info Date_t::now(), // wall clock time - 23), // statement id + {23}), // statement ids // Session 2 entries makeOplogEntry(OpTime(Timestamp(50, 2), 1), // optime @@ -1646,14 +1647,14 @@ TEST_F(SessionCatalogMigrationDestinationTest, boost::none, // o2 sessionInfo2, // session info Date_t::now(), // wall clock time - 56), // statement id + {56}), // statement ids makeOplogEntry(OpTime(Timestamp(20, 2), 1), // optime OpTypeEnum::kInsert, // op type BSON("x" << 20), // o boost::none, // o2 sessionInfo2, // session info Date_t::now(), // wall clock time - 55)}; // statement id + {55})}; // statement ids SessionCatalogMigrationDestination sessionMigration(kNs, kFromShard, migrationId()); sessionMigration.start(getServiceContext()); @@ -1747,7 +1748,7 @@ TEST_F(SessionCatalogMigrationDestinationTest, MigratingKnownStmtWhileOplogTrunc boost::none, // o2 sessionInfo, // session info Date_t::now(), // wall clock time - kStmtId); // statement id + {kStmtId}); // statement ids SessionCatalogMigrationDestination sessionMigration(kNs, kFromShard, migrationId()); sessionMigration.start(getServiceContext()); |