diff options
author | Mindaugas Malinauskas <mindaugas.malinauskas@mongodb.com> | 2021-10-19 15:40:24 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-11-23 16:46:57 +0000 |
commit | f0cd29a263e273546de7be170d7ad6207b192394 (patch) | |
tree | 800a87b804b63c07f984308d1cc913f7ee12e1dd /src/mongo/db/repl/collection_cloner.cpp | |
parent | eb85f47359a482322222ccb5745b8c1109350752 (diff) | |
download | mongo-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.cpp | 7 |
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, |