diff options
Diffstat (limited to 'src/mongo/db/namespace_string.h')
-rw-r--r-- | src/mongo/db/namespace_string.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mongo/db/namespace_string.h b/src/mongo/db/namespace_string.h index 17ea8855bc7..339c62ce23f 100644 --- a/src/mongo/db/namespace_string.h +++ b/src/mongo/db/namespace_string.h @@ -307,6 +307,9 @@ public: bool isSystemDotProfile() const { return coll() == "system.profile"; } + bool isChangeCollection() const { + return (db() == kConfigDb) && coll().startsWith("changes."); + } bool isSystemDotViews() const { return coll() == kSystemDotViewsCollectionName; } @@ -384,6 +387,11 @@ public: bool isConfigImagesCollection() const; /** + * Returns whether the specified namespace is config.transactions. + */ + bool isConfigTransactionsCollection() const; + + /** * Returns the time-series buckets namespace for this view. */ NamespaceString makeTimeseriesBucketsNamespace() const; @@ -394,6 +402,15 @@ public: NamespaceString getTimeseriesViewNamespace() const; /** + * Returns whether the namespace is implicitly replicated, based only on its string value. + * + * An implicitly replicated namespace is an internal namespace which does not replicate writes + * via the oplog, with the exception of deletions. Writes are not replicated as an optimization + * because their content can be reliably derived from entries in the oplog. + */ + bool isImplicitlyReplicated() const; + + /** * Returns whether a namespace is replicated, based only on its string value. One notable * omission is that map reduce `tmp.mr` collections may or may not be replicated. Callers must * decide how to handle that case separately. |