summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/collection_cloner.cpp
diff options
context:
space:
mode:
authorMindaugas Malinauskas <mindaugas.malinauskas@mongodb.com>2021-10-19 15:40:24 +0100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-23 16:46:57 +0000
commitf0cd29a263e273546de7be170d7ad6207b192394 (patch)
tree800a87b804b63c07f984308d1cc913f7ee12e1dd /src/mongo/db/repl/collection_cloner.cpp
parenteb85f47359a482322222ccb5745b8c1109350752 (diff)
downloadmongo-f0cd29a263e273546de7be170d7ad6207b192394.tar.gz
SERVER-60238 Implement pre-image propagation to secondaries for non-transactional writes
Diffstat (limited to 'src/mongo/db/repl/collection_cloner.cpp')
-rw-r--r--src/mongo/db/repl/collection_cloner.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/repl/collection_cloner.cpp b/src/mongo/db/repl/collection_cloner.cpp
index 810876155b4..00c817a5b32 100644
--- a/src/mongo/db/repl/collection_cloner.cpp
+++ b/src/mongo/db/repl/collection_cloner.cpp
@@ -109,6 +109,13 @@ CollectionCloner::CollectionCloner(const NamespaceString& sourceNss,
}
BaseCloner::ClonerStages CollectionCloner::getStages() {
+ if (_sourceNss.isChangeStreamPreImagesCollection()) {
+ // Only the change stream pre-images collection needs to be created - its documents should
+ // not be copied.
+ return {&_listIndexesStage,
+ &_createCollectionStage,
+ &_setupIndexBuildersForUnfinishedIndexesStage};
+ }
return {&_countStage,
&_listIndexesStage,
&_createCollectionStage,