summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@mongodb.com>2019-08-22 18:24:39 +0000
committerevergreen <evergreen@mongodb.com>2019-08-22 18:24:39 +0000
commit2e0eb6286f37a132e32d4a42dc5680229e2587f2 (patch)
treee07d5f19b92bbd00ee83d82519a0a91b38cfaff7
parent922fc6149715699d0c2e035152f1ee954599bf04 (diff)
downloadmongo-2e0eb6286f37a132e32d4a42dc5680229e2587f2.tar.gz
SERVER-42965 Remove unused param "stableTimestampForRecovery"
-rw-r--r--src/mongo/db/repl/applier_helpers.cpp2
-rw-r--r--src/mongo/db/repl/apply_ops.cpp4
-rw-r--r--src/mongo/db/repl/dbcheck.cpp3
-rw-r--r--src/mongo/db/repl/dbcheck.h3
-rw-r--r--src/mongo/db/repl/oplog.cpp107
-rw-r--r--src/mongo/db/repl/oplog.h3
-rw-r--r--src/mongo/db/repl/oplog_applier.h4
-rw-r--r--src/mongo/db/repl/replication_recovery.cpp9
-rw-r--r--src/mongo/db/repl/sync_tail.cpp10
-rw-r--r--src/mongo/db/repl/sync_tail.h3
-rw-r--r--src/mongo/db/repl/sync_tail_test.cpp29
-rw-r--r--src/mongo/db/repl/sync_tail_test_fixture.cpp5
-rw-r--r--src/mongo/dbtests/storage_timestamp_tests.cpp2
13 files changed, 47 insertions, 137 deletions
diff --git a/src/mongo/db/repl/applier_helpers.cpp b/src/mongo/db/repl/applier_helpers.cpp
index c12fdcbeaf1..3cc7ecabd73 100644
--- a/src/mongo/db/repl/applier_helpers.cpp
+++ b/src/mongo/db/repl/applier_helpers.cpp
@@ -140,7 +140,7 @@ StatusWith<InsertGroup::ConstIterator> InsertGroup::groupAndApplyInserts(ConstIt
OplogEntryBatch groupedInsertBatch(it, endOfGroupableOpsIterator);
try {
// Apply the group of inserts by passing in groupedInsertBatch.
- uassertStatusOK(SyncTail::syncApply(_opCtx, groupedInsertBatch, _mode, boost::none));
+ uassertStatusOK(SyncTail::syncApply(_opCtx, groupedInsertBatch, _mode));
// It succeeded, advance the oplogEntriesIterator to the end of the
// group of inserts.
return endOfGroupableOpsIterator - 1;
diff --git a/src/mongo/db/repl/apply_ops.cpp b/src/mongo/db/repl/apply_ops.cpp
index ede0399d161..49f8aab83ec 100644
--- a/src/mongo/db/repl/apply_ops.cpp
+++ b/src/mongo/db/repl/apply_ops.cpp
@@ -215,8 +215,8 @@ Status _applyOps(OperationContext* opCtx,
auto entry = uassertStatusOK(OplogEntry::parse(builder.done()));
if (*opType == 'c') {
invariant(opCtx->lockState()->isW());
- uassertStatusOK(applyCommand_inlock(
- opCtx, entry, oplogApplicationMode, boost::none));
+ uassertStatusOK(
+ applyCommand_inlock(opCtx, entry, oplogApplicationMode));
return Status::OK();
}
diff --git a/src/mongo/db/repl/dbcheck.cpp b/src/mongo/db/repl/dbcheck.cpp
index b1d4bf2f84f..90f5391f161 100644
--- a/src/mongo/db/repl/dbcheck.cpp
+++ b/src/mongo/db/repl/dbcheck.cpp
@@ -513,8 +513,7 @@ namespace repl {
*/
Status dbCheckOplogCommand(OperationContext* opCtx,
const repl::OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) {
+ OplogApplication::Mode mode) {
const auto& cmd = entry.getObject();
OpTime opTime;
if (!opCtx->writesAreReplicated()) {
diff --git a/src/mongo/db/repl/dbcheck.h b/src/mongo/db/repl/dbcheck.h
index 3f0a9f88e37..240c20bb293 100644
--- a/src/mongo/db/repl/dbcheck.h
+++ b/src/mongo/db/repl/dbcheck.h
@@ -222,7 +222,6 @@ namespace repl {
*/
Status dbCheckOplogCommand(OperationContext* opCtx,
const repl::OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery);
+ OplogApplication::Mode mode);
} // namespace repl
} // namespace mongo
diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp
index e31c7e9394b..9c4a1e4da7e 100644
--- a/src/mongo/db/repl/oplog.cpp
+++ b/src/mongo/db/repl/oplog.cpp
@@ -687,10 +687,8 @@ NamespaceString extractNsFromUUIDorNs(OperationContext* opCtx,
return ui ? extractNsFromUUID(opCtx, ui) : extractNs(ns, cmd);
}
-using OpApplyFn = std::function<Status(OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery)>;
+using OpApplyFn = std::function<Status(
+ OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode)>;
struct ApplyOpMetadata {
OpApplyFn applyFunc;
@@ -708,10 +706,7 @@ struct ApplyOpMetadata {
const StringMap<ApplyOpMetadata> kOpsMap = {
{"create",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
const auto& ui = entry.getUuid();
const auto& cmd = entry.getObject();
const NamespaceString nss(extractNs(entry.getNss(), cmd));
@@ -734,10 +729,7 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
},
{ErrorCodes::NamespaceExists}}},
{"createIndexes",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
const auto& cmd = entry.getObject();
const NamespaceString nss(
extractNsFromUUIDorNs(opCtx, entry.getNss(), entry.getUuid(), cmd));
@@ -756,10 +748,7 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
ErrorCodes::IndexBuildAlreadyInProgress,
ErrorCodes::NamespaceNotFound}}},
{"startIndexBuild",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
// {
// "startIndexBuild" : "coll",
// "indexBuildUUID" : <UUID>,
@@ -813,10 +802,7 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
return startIndexBuild(opCtx, nss, collUUID, indexBuildUUID, indexesElem, mode);
}}},
{"commitIndexBuild",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
// {
// "commitIndexBuild" : "coll",
// "indexBuildUUID" : <UUID>,
@@ -873,10 +859,7 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
},
{}}},
{"abortIndexBuild",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
// {
// "abortIndexBuild" : "coll",
// "indexBuildUUID" : <UUID>,
@@ -932,10 +915,7 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
return abortIndexBuild(opCtx, indexBuildUUID, mode);
}}},
{"collMod",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
NamespaceString nss;
BSONObjBuilder resultWeDontCareAbout;
const auto& cmd = entry.getObject();
@@ -946,18 +926,12 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
{ErrorCodes::IndexNotFound, ErrorCodes::NamespaceNotFound}}},
{"dbCheck", {dbCheckOplogCommand, {}}},
{"dropDatabase",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
return dropDatabase(opCtx, entry.getNss().db().toString());
},
{ErrorCodes::NamespaceNotFound}}},
{"drop",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
BSONObjBuilder resultWeDontCareAbout;
const auto& cmd = entry.getObject();
auto nss = extractNsFromUUIDorNs(opCtx, entry.getNss(), entry.getUuid(), cmd);
@@ -983,10 +957,7 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
{ErrorCodes::NamespaceNotFound}}},
// deleteIndex(es) is deprecated but still works as of April 10, 2015
{"deleteIndex",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
BSONObjBuilder resultWeDontCareAbout;
const auto& cmd = entry.getObject();
return dropIndexes(opCtx,
@@ -996,10 +967,7 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
},
{ErrorCodes::NamespaceNotFound, ErrorCodes::IndexNotFound}}},
{"deleteIndexes",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
BSONObjBuilder resultWeDontCareAbout;
const auto& cmd = entry.getObject();
return dropIndexes(opCtx,
@@ -1009,10 +977,7 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
},
{ErrorCodes::NamespaceNotFound, ErrorCodes::IndexNotFound}}},
{"dropIndex",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
BSONObjBuilder resultWeDontCareAbout;
const auto& cmd = entry.getObject();
return dropIndexes(opCtx,
@@ -1022,10 +987,7 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
},
{ErrorCodes::NamespaceNotFound, ErrorCodes::IndexNotFound}}},
{"dropIndexes",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
BSONObjBuilder resultWeDontCareAbout;
const auto& cmd = entry.getObject();
return dropIndexes(opCtx,
@@ -1035,10 +997,7 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
},
{ErrorCodes::NamespaceNotFound, ErrorCodes::IndexNotFound}}},
{"renameCollection",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
// Parse optime from oplog entry unless we are applying this command in standalone or on a
// primary (replicated writes enabled).
OpTime opTime;
@@ -1050,18 +1009,12 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
},
{ErrorCodes::NamespaceNotFound, ErrorCodes::NamespaceExists}}},
{"applyOps",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
return entry.shouldPrepare() ? applyPrepareTransaction(opCtx, entry, mode)
: applyApplyOpsOplogEntry(opCtx, entry, mode);
}}},
{"convertToCapped",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
const auto& cmd = entry.getObject();
convertToCapped(opCtx,
extractNsFromUUIDorNs(opCtx, entry.getNss(), entry.getUuid(), cmd),
@@ -1070,27 +1023,18 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
},
{ErrorCodes::NamespaceNotFound}}},
{"emptycapped",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
return emptyCapped(
opCtx,
extractNsFromUUIDorNs(opCtx, entry.getNss(), entry.getUuid(), entry.getObject()));
},
{ErrorCodes::NamespaceNotFound}}},
{"commitTransaction",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
return applyCommitTransaction(opCtx, entry, mode);
}}},
{"abortTransaction",
- {[](OperationContext* opCtx,
- const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) -> Status {
+ {[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
return applyAbortTransaction(opCtx, entry, mode);
}}},
};
@@ -1568,14 +1512,9 @@ Status applyOperation_inlock(OperationContext* opCtx,
Status applyCommand_inlock(OperationContext* opCtx,
const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery) {
- // We should only have a stableTimestampForRecovery during replication recovery.
- invariant(stableTimestampForRecovery == boost::none ||
- mode == OplogApplication::Mode::kRecovering);
+ OplogApplication::Mode mode) {
LOG(3) << "applying command op: " << redact(entry.toBSON())
- << ", oplog application mode: " << OplogApplication::modeToString(mode)
- << ", stable timestamp for recovery: " << stableTimestampForRecovery;
+ << ", oplog application mode: " << OplogApplication::modeToString(mode);
// Only commands are processed here.
invariant(entry.getOpType() == OpTypeEnum::kCommand);
@@ -1682,7 +1621,7 @@ Status applyCommand_inlock(OperationContext* opCtx,
// If 'writeTime' is not null, any writes in this scope will be given 'writeTime' as
// their timestamp at commit.
TimestampBlock tsBlock(opCtx, writeTime);
- return curOpToApply.applyFunc(opCtx, entry, mode, stableTimestampForRecovery);
+ return curOpToApply.applyFunc(opCtx, entry, mode);
} catch (const DBException& ex) {
return ex.toStatus();
}
diff --git a/src/mongo/db/repl/oplog.h b/src/mongo/db/repl/oplog.h
index 34da8931085..c0df9e73cda 100644
--- a/src/mongo/db/repl/oplog.h
+++ b/src/mongo/db/repl/oplog.h
@@ -214,8 +214,7 @@ Status applyOperation_inlock(OperationContext* opCtx,
*/
Status applyCommand_inlock(OperationContext* opCtx,
const OplogEntry& entry,
- OplogApplication::Mode mode,
- boost::optional<Timestamp> stableTimestampForRecovery);
+ OplogApplication::Mode mode);
/**
* Initializes the global Timestamp with the value from the timestamp of the last oplog entry.
diff --git a/src/mongo/db/repl/oplog_applier.h b/src/mongo/db/repl/oplog_applier.h
index 7f5c492803f..317cc444a91 100644
--- a/src/mongo/db/repl/oplog_applier.h
+++ b/src/mongo/db/repl/oplog_applier.h
@@ -75,10 +75,6 @@ public:
// be something other than the null optime.
OpTime beginApplyingOpTime = OpTime();
- // For replication recovery only. During replication rollback, this is used to keep track
- // of the stable timestamp from which we replay the oplog.
- boost::optional<Timestamp> stableTimestampForRecovery;
-
const OplogApplication::Mode mode;
};
diff --git a/src/mongo/db/repl/replication_recovery.cpp b/src/mongo/db/repl/replication_recovery.cpp
index 999c79fb9af..f13cbeaa21c 100644
--- a/src/mongo/db/repl/replication_recovery.cpp
+++ b/src/mongo/db/repl/replication_recovery.cpp
@@ -360,15 +360,6 @@ void ReplicationRecoveryImpl::_applyToEndOfOplog(OperationContext* opCtx,
OplogApplier::Options options(OplogApplication::Mode::kRecovering);
options.allowNamespaceNotFoundErrorsOnCrudOps = true;
options.skipWritesToOplog = true;
- // During replication recovery, the stableTimestampForRecovery refers to the stable timestamp
- // from which we replay the oplog.
- // For startup recovery, this will be the recovery timestamp, which is the stable timestamp that
- // the storage engine recovered to on startup. For rollback recovery, this will be the last
- // stable timestamp, returned when we call recoverToStableTimestamp.
- // We keep track of this for prepared transactions so that when we apply a commitTransaction
- // oplog entry, we can check if it occurs before or after the stable timestamp and decide
- // whether the operations would have already been reflected in the data.
- options.stableTimestampForRecovery = oplogApplicationStartPoint;
OplogApplierImpl oplogApplier(nullptr,
&oplogBuffer,
&stats,
diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp
index 6d3fb15810b..64b9071dd99 100644
--- a/src/mongo/db/repl/sync_tail.cpp
+++ b/src/mongo/db/repl/sync_tail.cpp
@@ -276,8 +276,7 @@ LockMode fixLockModeForSystemDotViewsChanges(const NamespaceString& nss, LockMod
// static
Status SyncTail::syncApply(OperationContext* opCtx,
const OplogEntryBatch& batch,
- OplogApplication::Mode oplogApplicationMode,
- boost::optional<Timestamp> stableTimestampForRecovery) {
+ OplogApplication::Mode oplogApplicationMode) {
auto op = batch.getOp();
// Count each log op application as a separate operation, for reporting purposes
CurOp individualOp(opCtx);
@@ -361,8 +360,7 @@ Status SyncTail::syncApply(OperationContext* opCtx,
} else if (opType == OpTypeEnum::kCommand) {
return finishApply(writeConflictRetry(opCtx, "syncApply_command", nss.ns(), [&] {
// A special case apply for commands to avoid implicit database creation.
- Status status =
- applyCommand_inlock(opCtx, op, oplogApplicationMode, stableTimestampForRecovery);
+ Status status = applyCommand_inlock(opCtx, op, oplogApplicationMode);
incrementOpsAppliedStats();
return status;
}));
@@ -885,9 +883,7 @@ Status multiSyncApply(OperationContext* opCtx,
// If we didn't create a group, try to apply the op individually.
try {
- auto stableTimestampForRecovery = st->getOptions().stableTimestampForRecovery;
- const Status status = SyncTail::syncApply(
- opCtx, &entry, oplogApplicationMode, stableTimestampForRecovery);
+ const Status status = SyncTail::syncApply(opCtx, &entry, oplogApplicationMode);
if (!status.isOK()) {
// Tried to apply an update operation but the document is missing, there must be
diff --git a/src/mongo/db/repl/sync_tail.h b/src/mongo/db/repl/sync_tail.h
index 65d7639e5cb..d5f74cda72d 100644
--- a/src/mongo/db/repl/sync_tail.h
+++ b/src/mongo/db/repl/sync_tail.h
@@ -79,8 +79,7 @@ public:
*/
static Status syncApply(OperationContext* opCtx,
const OplogEntryBatch& batch,
- OplogApplication::Mode oplogApplicationMode,
- boost::optional<Timestamp> stableTimestampForRecovery);
+ OplogApplication::Mode oplogApplicationMode);
/**
*
* Constructs a SyncTail.
diff --git a/src/mongo/db/repl/sync_tail_test.cpp b/src/mongo/db/repl/sync_tail_test.cpp
index 1e544e731fb..52d1c8a365e 100644
--- a/src/mongo/db/repl/sync_tail_test.cpp
+++ b/src/mongo/db/repl/sync_tail_test.cpp
@@ -192,9 +192,8 @@ auto parseFromOplogEntryArray(const BSONObj& obj, int elem) {
TEST_F(SyncTailTest, SyncApplyInsertDocumentDatabaseMissing) {
NamespaceString nss("test.t");
auto op = makeOplogEntry(OpTypeEnum::kInsert, nss, {});
- ASSERT_THROWS(
- SyncTail::syncApply(_opCtx.get(), &op, OplogApplication::Mode::kSecondary, boost::none),
- ExceptionFor<ErrorCodes::NamespaceNotFound>);
+ ASSERT_THROWS(SyncTail::syncApply(_opCtx.get(), &op, OplogApplication::Mode::kSecondary),
+ ExceptionFor<ErrorCodes::NamespaceNotFound>);
}
TEST_F(SyncTailTest, SyncApplyDeleteDocumentDatabaseMissing) {
@@ -208,9 +207,8 @@ TEST_F(SyncTailTest, SyncApplyInsertDocumentCollectionLookupByUUIDFails) {
createDatabase(_opCtx.get(), nss.db());
NamespaceString otherNss(nss.getSisterNS("othername"));
auto op = makeOplogEntry(OpTypeEnum::kInsert, otherNss, kUuid);
- ASSERT_THROWS(
- SyncTail::syncApply(_opCtx.get(), &op, OplogApplication::Mode::kSecondary, boost::none),
- ExceptionFor<ErrorCodes::NamespaceNotFound>);
+ ASSERT_THROWS(SyncTail::syncApply(_opCtx.get(), &op, OplogApplication::Mode::kSecondary),
+ ExceptionFor<ErrorCodes::NamespaceNotFound>);
}
TEST_F(SyncTailTest, SyncApplyDeleteDocumentCollectionLookupByUUIDFails) {
@@ -228,9 +226,8 @@ TEST_F(SyncTailTest, SyncApplyInsertDocumentCollectionMissing) {
// which in the case of this test just ignores such errors. This tests mostly that we don't
// implicitly create the collection and lock the database in MODE_X.
auto op = makeOplogEntry(OpTypeEnum::kInsert, nss, {});
- ASSERT_THROWS(
- SyncTail::syncApply(_opCtx.get(), &op, OplogApplication::Mode::kSecondary, boost::none),
- ExceptionFor<ErrorCodes::NamespaceNotFound>);
+ ASSERT_THROWS(SyncTail::syncApply(_opCtx.get(), &op, OplogApplication::Mode::kSecondary),
+ ExceptionFor<ErrorCodes::NamespaceNotFound>);
ASSERT_FALSE(collectionExists(_opCtx.get(), nss));
}
@@ -303,8 +300,7 @@ TEST_F(SyncTailTest, SyncApplyCommand) {
ASSERT_TRUE(_opCtx->writesAreReplicated());
ASSERT_FALSE(documentValidationDisabled(_opCtx.get()));
auto entry = OplogEntry(op);
- ASSERT_OK(SyncTail::syncApply(
- _opCtx.get(), &entry, OplogApplication::Mode::kInitialSync, boost::none));
+ ASSERT_OK(SyncTail::syncApply(_opCtx.get(), &entry, OplogApplication::Mode::kInitialSync));
ASSERT_TRUE(applyCmdCalled);
}
@@ -2255,8 +2251,7 @@ TEST_F(SyncTailTest, LogSlowOpApplicationWhenSuccessful) {
auto entry = makeOplogEntry(OpTypeEnum::kInsert, nss, {});
startCapturingLogMessages();
- ASSERT_OK(
- SyncTail::syncApply(_opCtx.get(), &entry, OplogApplication::Mode::kSecondary, boost::none));
+ ASSERT_OK(SyncTail::syncApply(_opCtx.get(), &entry, OplogApplication::Mode::kSecondary));
// Use a builder for easier escaping. We expect the operation to be logged.
StringBuilder expected;
@@ -2277,9 +2272,8 @@ TEST_F(SyncTailTest, DoNotLogSlowOpApplicationWhenFailed) {
auto entry = makeOplogEntry(OpTypeEnum::kInsert, nss, {});
startCapturingLogMessages();
- ASSERT_THROWS(
- SyncTail::syncApply(_opCtx.get(), &entry, OplogApplication::Mode::kSecondary, boost::none),
- ExceptionFor<ErrorCodes::NamespaceNotFound>);
+ ASSERT_THROWS(SyncTail::syncApply(_opCtx.get(), &entry, OplogApplication::Mode::kSecondary),
+ ExceptionFor<ErrorCodes::NamespaceNotFound>);
// Use a builder for easier escaping. We expect the operation to *not* be logged
// even thought it was slow, since we couldn't apply it successfully.
@@ -2302,8 +2296,7 @@ TEST_F(SyncTailTest, DoNotLogNonSlowOpApplicationWhenSuccessful) {
auto entry = makeOplogEntry(OpTypeEnum::kInsert, nss, {});
startCapturingLogMessages();
- ASSERT_OK(
- SyncTail::syncApply(_opCtx.get(), &entry, OplogApplication::Mode::kSecondary, boost::none));
+ ASSERT_OK(SyncTail::syncApply(_opCtx.get(), &entry, OplogApplication::Mode::kSecondary));
// Use a builder for easier escaping. We expect the operation to *not* be logged,
// since it wasn't slow to apply.
diff --git a/src/mongo/db/repl/sync_tail_test_fixture.cpp b/src/mongo/db/repl/sync_tail_test_fixture.cpp
index 7c85abeabf3..42036edba5d 100644
--- a/src/mongo/db/repl/sync_tail_test_fixture.cpp
+++ b/src/mongo/db/repl/sync_tail_test_fixture.cpp
@@ -192,9 +192,8 @@ void SyncTailTest::_testSyncApplyCrudOperation(ErrorCodes::Error expectedError,
};
ASSERT_TRUE(_opCtx->writesAreReplicated());
ASSERT_FALSE(documentValidationDisabled(_opCtx.get()));
- ASSERT_EQ(
- SyncTail::syncApply(_opCtx.get(), &op, OplogApplication::Mode::kSecondary, boost::none),
- expectedError);
+ ASSERT_EQ(SyncTail::syncApply(_opCtx.get(), &op, OplogApplication::Mode::kSecondary),
+ expectedError);
ASSERT_EQ(applyOpCalled, expectedApplyOpCalled);
}
diff --git a/src/mongo/dbtests/storage_timestamp_tests.cpp b/src/mongo/dbtests/storage_timestamp_tests.cpp
index bb4282590b3..50f269970c7 100644
--- a/src/mongo/dbtests/storage_timestamp_tests.cpp
+++ b/src/mongo/dbtests/storage_timestamp_tests.cpp
@@ -776,7 +776,7 @@ public:
repl::OplogEntryBatch groupedInsertBatch(opPtrs.cbegin(), opPtrs.cend());
ASSERT_OK(repl::SyncTail::syncApply(
- _opCtx, groupedInsertBatch, repl::OplogApplication::Mode::kSecondary, boost::none));
+ _opCtx, groupedInsertBatch, repl::OplogApplication::Mode::kSecondary));
for (std::int32_t idx = 0; idx < docsToInsert; ++idx) {
OneOffRead oor(_opCtx, firstInsertTime.addTicks(idx).asTimestamp());