From 0bf18b0a3a12e23308af9d26fb1e993a8ec81f36 Mon Sep 17 00:00:00 2001 From: Randolph Tan Date: Mon, 12 Feb 2018 10:43:55 -0500 Subject: SERVER-32806 retried FindAndModify not using oplogHack when querying for pre/post image oplog entry (cherry picked from commit ee26a6df68dc93e3e66f99180e2d03af09fd9daa) --- src/mongo/db/ops/write_ops_retryability.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mongo/db/ops/write_ops_retryability.cpp b/src/mongo/db/ops/write_ops_retryability.cpp index 797db187565..c9525140324 100644 --- a/src/mongo/db/ops/write_ops_retryability.cpp +++ b/src/mongo/db/ops/write_ops_retryability.cpp @@ -121,7 +121,10 @@ BSONObj extractPreOrPostImage(OperationContext* opCtx, const repl::OplogEntry& o : oplog.getPostImageOpTime().value(); DBDirectClient client(opCtx); - auto oplogDoc = client.findOne(NamespaceString::kRsOplogNamespace.ns(), opTime.asQuery()); + auto oplogDoc = client.findOne(NamespaceString::kRsOplogNamespace.ns(), + opTime.asQuery(), + nullptr, + QueryOption_OplogReplay); uassert(40613, str::stream() << "oplog no longer contains the complete write history of this " -- cgit v1.2.1