diff options
author | Rishab Joshi <rishab.joshi@mongodb.com> | 2022-05-18 13:28:53 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-18 14:32:38 +0000 |
commit | fb4100100d9c97f144eeaa44fae04ebdd00f3709 (patch) | |
tree | 5fc04c2950eab4bcce962c718f0bd90fb46af8a5 /src/mongo/db/namespace_string.cpp | |
parent | c84c8fcf240a5548462110211fef1e4d5612b37a (diff) | |
download | mongo-fb4100100d9c97f144eeaa44fae04ebdd00f3709.tar.gz |
SERVER-65209 Skeleton code to create change collection.
Diffstat (limited to 'src/mongo/db/namespace_string.cpp')
-rw-r--r-- | src/mongo/db/namespace_string.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mongo/db/namespace_string.cpp b/src/mongo/db/namespace_string.cpp index 26f9249996e..525dd9c6724 100644 --- a/src/mongo/db/namespace_string.cpp +++ b/src/mongo/db/namespace_string.cpp @@ -243,6 +243,10 @@ bool NamespaceString::isLegalClientSystemNS( return true; } + if (isChangeStreamChangeCollection()) { + return true; + } + return false; } @@ -400,6 +404,10 @@ bool NamespaceString::isChangeStreamPreImagesCollection() const { return ns() == kChangeStreamPreImagesNamespace.ns(); } +bool NamespaceString::isChangeStreamChangeCollection() const { + return db() == kConfigDb && coll() == kChangeStreamChangeCollection; +} + bool NamespaceString::isConfigImagesCollection() const { return ns() == kConfigImagesNamespace.ns(); } @@ -424,7 +432,8 @@ NamespaceString NamespaceString::getTimeseriesViewNamespace() const { } bool NamespaceString::isImplicitlyReplicated() const { - if (isChangeStreamPreImagesCollection() || isConfigImagesCollection() || isChangeCollection()) { + if (isChangeStreamPreImagesCollection() || isConfigImagesCollection() || isChangeCollection() || + isChangeStreamChangeCollection()) { // Implicitly replicated namespaces are replicated, although they only replicate a subset of // writes. invariant(isReplicated()); |