summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/session_catalog_migration_source.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@mongodb.com>2020-03-23 15:54:10 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-26 19:07:14 +0000
commitd0b52ddd66d7e9d79ff5d46a35d760a328464da7 (patch)
tree6376b547bd71cc98072258cdc6e9036f69b86996 /src/mongo/db/s/session_catalog_migration_source.cpp
parentbcbae014e202d0ed38da00406df5b2a00d70eb03 (diff)
downloadmongo-d0b52ddd66d7e9d79ff5d46a35d760a328464da7.tar.gz
SERVER-41873 Remove most remaining uses of 'oplogReplay' flag
Starting in 4.4, this flag is accepted by the server but does not affect how the query is executed. However, there were several places in the code base where 'oplogReplay' needed to be handled due to the possibility of a mixed version 4.2/4.4 cluster. This logic can now be removed, since a 4.6 node need not be compatible with 4.2. In order to avoid breaking old drivers, the 'oplogReplay' find command option and OP_QUERY flag bit will continue to be accepted but ignored.
Diffstat (limited to 'src/mongo/db/s/session_catalog_migration_source.cpp')
-rw-r--r--src/mongo/db/s/session_catalog_migration_source.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mongo/db/s/session_catalog_migration_source.cpp b/src/mongo/db/s/session_catalog_migration_source.cpp
index b2de3c576de..1777524e3a1 100644
--- a/src/mongo/db/s/session_catalog_migration_source.cpp
+++ b/src/mongo/db/s/session_catalog_migration_source.cpp
@@ -68,10 +68,8 @@ boost::optional<repl::OplogEntry> fetchPrePostImageOplog(OperationContext* opCtx
auto opTime = opTimeToFetch.value();
DBDirectClient client(opCtx);
- auto oplogBSON = client.findOne(NamespaceString::kRsOplogNamespace.ns(),
- opTime.asQuery(),
- nullptr,
- QueryOption_OplogReplay);
+ auto oplogBSON =
+ client.findOne(NamespaceString::kRsOplogNamespace.ns(), opTime.asQuery(), nullptr);
return uassertStatusOK(repl::OplogEntry::parse(oplogBSON));
}
@@ -345,18 +343,14 @@ bool SessionCatalogMigrationSource::_fetchNextNewWriteOplog(OperationContext* op
}
DBDirectClient client(opCtx);
- const auto& newWriteOplogDoc = client.findOne(NamespaceString::kRsOplogNamespace.ns(),
- nextOpTimeToFetch.asQuery(),
- nullptr,
- QueryOption_OplogReplay);
-
+ const auto& newWriteOplogDoc = client.findOne(
+ NamespaceString::kRsOplogNamespace.ns(), nextOpTimeToFetch.asQuery(), nullptr);
uassert(40620,
str::stream() << "Unable to fetch oplog entry with opTime: "
<< nextOpTimeToFetch.toBSON(),
!newWriteOplogDoc.isEmpty());
-
auto newWriteOplogEntry = uassertStatusOK(repl::OplogEntry::parse(newWriteOplogDoc));
// If this oplog entry corresponds to transaction prepare/commit, replace it with a sentinel