summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops/write_ops_retryability.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-10-20 17:03:18 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-10-23 17:54:51 -0400
commitaa95387d1a8fb475c267a3ca0e84a1b4a18a7ace (patch)
treef258c7c961e7577d35b49080cfe1abe660889ab9 /src/mongo/db/ops/write_ops_retryability.cpp
parentdbe347e2ec54858a39a2b4c59d5812214b4b94cd (diff)
downloadmongo-aa95387d1a8fb475c267a3ca0e84a1b4a18a7ace.tar.gz
SERVER-31328 Don't fetch oplog entries for retries of executed inserts or deletes
Diffstat (limited to 'src/mongo/db/ops/write_ops_retryability.cpp')
-rw-r--r--src/mongo/db/ops/write_ops_retryability.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/mongo/db/ops/write_ops_retryability.cpp b/src/mongo/db/ops/write_ops_retryability.cpp
index 28ce5bed8be..10e5c8701a2 100644
--- a/src/mongo/db/ops/write_ops_retryability.cpp
+++ b/src/mongo/db/ops/write_ops_retryability.cpp
@@ -173,27 +173,6 @@ repl::OplogEntry getInnerNestedOplogEntry(const repl::OplogEntry& entry) {
} // namespace
-SingleWriteResult parseOplogEntryForInsert(const repl::OplogEntry& entry) {
- if (entry.getOpType() == repl::OpTypeEnum::kNoop) {
- return parseOplogEntryForInsert(getInnerNestedOplogEntry(entry));
- }
-
- uassert(40636,
- str::stream() << "insert retry request is not compatible with previous write in the "
- "transaction of type: "
- << OpType_serializer(entry.getOpType())
- << ", oplogTs: "
- << entry.getTimestamp().toString()
- << ", oplog: "
- << redact(entry.toBSON()),
- entry.getOpType() == repl::OpTypeEnum::kInsert);
-
- SingleWriteResult res;
- res.setN(1);
- res.setNModified(0);
- return res;
-}
-
SingleWriteResult parseOplogEntryForUpdate(const repl::OplogEntry& entry) {
SingleWriteResult res;
// Upserts are stored as inserts.
@@ -223,27 +202,6 @@ SingleWriteResult parseOplogEntryForUpdate(const repl::OplogEntry& entry) {
return res;
}
-SingleWriteResult parseOplogEntryForDelete(const repl::OplogEntry& entry) {
- if (entry.getOpType() == repl::OpTypeEnum::kNoop) {
- return parseOplogEntryForDelete(getInnerNestedOplogEntry(entry));
- }
-
- uassert(40637,
- str::stream() << "delete retry request is not compatible with previous write in the "
- "transaction of type: "
- << OpType_serializer(entry.getOpType())
- << ", oplogTs: "
- << entry.getTimestamp().toString()
- << ", oplog: "
- << redact(entry.toBSON()),
- entry.getOpType() == repl::OpTypeEnum::kDelete);
-
- SingleWriteResult res;
- res.setN(1);
- res.setNModified(0);
- return res;
-}
-
void parseOplogEntryForFindAndModify(OperationContext* opCtx,
const FindAndModifyRequest& request,
const repl::OplogEntry& oplogEntry,