diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2018-11-25 03:37:30 +0000 |
---|---|---|
committer | Bernard Gorman <bernard.gorman@gmail.com> | 2019-01-09 02:59:49 +0000 |
commit | 16c7973fc8037ee0b7bd12116e5ff25084af142b (patch) | |
tree | a357dc1ba14d29dea7e9012907dabe6d1ad75946 /src/mongo/db/pipeline/document_source_replace_root.cpp | |
parent | 214bf238fedc4e147e6473f5fc64428987added6 (diff) | |
download | mongo-16c7973fc8037ee0b7bd12116e5ff25084af142b.tar.gz |
SERVER-38410 Allow ARM to consume postBatchResumeToken
Diffstat (limited to 'src/mongo/db/pipeline/document_source_replace_root.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_replace_root.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/document_source_replace_root.cpp b/src/mongo/db/pipeline/document_source_replace_root.cpp index 4d5271727f1..78348e8154d 100644 --- a/src/mongo/db/pipeline/document_source_replace_root.cpp +++ b/src/mongo/db/pipeline/document_source_replace_root.cpp @@ -73,7 +73,9 @@ public: newRoot.getType() == Object); // Turn the value into a document. - return newRoot.getDocument(); + MutableDocument newDoc(newRoot.getDocument()); + newDoc.copyMetaDataFrom(input); + return newDoc.freeze(); } // Optimize the newRoot expression. |