diff options
author | Jason Chan <jason.chan@10gen.com> | 2020-03-19 20:37:48 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-13 21:02:42 +0000 |
commit | c4d62178fc49389241c742a78be1fc0eee279fe7 (patch) | |
tree | 1b1dbf8305bfb441367057bd9ce17e51f195dd8b /src/mongo/db/repl | |
parent | a0a6898ca793a2c45a5d8ac700ea71e520bc39bc (diff) | |
download | mongo-c4d62178fc49389241c742a78be1fc0eee279fe7.tar.gz |
SERVER-44450 Do not add fromMigrate field to applyOps insert oplog entries
(cherry picked from commit 7e12da83457ca5a8e76c7d6f39d6b9bbfad3be92)
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/oplog.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index 30600c23ae2..ad6956aecc3 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -1081,7 +1081,6 @@ Status applyOperation_inlock(OperationContext* opCtx, str::stream() << "Failed to apply insert due to missing collection: " << redact(opOrGroupedInserts.toBSON()), collection); - if (opOrGroupedInserts.isGroupedInserts()) { // Grouped inserts. @@ -1101,8 +1100,11 @@ Status applyOperation_inlock(OperationContext* opCtx, WriteUnitOfWork wuow(opCtx); OpDebug* const nullOpDebug = nullptr; - Status status = collection->insertDocuments( - opCtx, insertObjs.begin(), insertObjs.end(), nullOpDebug, true); + Status status = collection->insertDocuments(opCtx, + insertObjs.begin(), + insertObjs.end(), + nullOpDebug, + false /* fromMigrate */); if (!status.isOK()) { return status; } @@ -1176,8 +1178,10 @@ Status applyOperation_inlock(OperationContext* opCtx, } OpDebug* const nullOpDebug = nullptr; - Status status = collection->insertDocument( - opCtx, InsertStatement(o, timestamp, term), nullOpDebug, true); + Status status = collection->insertDocument(opCtx, + InsertStatement(o, timestamp, term), + nullOpDebug, + false /* fromMigrate */); if (status.isOK()) { wuow.commit(); |