summaryrefslogtreecommitdiff
path: root/src/mongo/db/namespace_string.cpp
diff options
context:
space:
mode:
authorRishab Joshi <rishab.joshi@mongodb.com>2022-05-18 13:28:53 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-18 14:32:38 +0000
commitfb4100100d9c97f144eeaa44fae04ebdd00f3709 (patch)
tree5fc04c2950eab4bcce962c718f0bd90fb46af8a5 /src/mongo/db/namespace_string.cpp
parentc84c8fcf240a5548462110211fef1e4d5612b37a (diff)
downloadmongo-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.cpp11
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());