summaryrefslogtreecommitdiff
path: root/src/mongo/db/namespace_string.h
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2020-10-23 13:12:00 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-10-23 18:28:15 +0000
commit393d0e45ffa5676a27116bbd3f3ed7b29a63d4bc (patch)
tree20d1c5f38ed3d8f4957de58dfb181a293ae1d8dd /src/mongo/db/namespace_string.h
parenta9a1aec2819dfca8795e022817189a651a09d2e4 (diff)
downloadmongo-393d0e45ffa5676a27116bbd3f3ed7b29a63d4bc.tar.gz
SERVER-51503 support creating system.buckets.X collections
Diffstat (limited to 'src/mongo/db/namespace_string.h')
-rw-r--r--src/mongo/db/namespace_string.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/db/namespace_string.h b/src/mongo/db/namespace_string.h
index a47014a3321..b5573ad92f2 100644
--- a/src/mongo/db/namespace_string.h
+++ b/src/mongo/db/namespace_string.h
@@ -76,6 +76,9 @@ public:
// Prefix for temporary resharding collection.
static constexpr StringData kTemporaryReshardingCollectionPrefix = "system.resharding."_sd;
+ // Prefix for time-series buckets collection.
+ static constexpr StringData kTimeseriesBucketsCollectionPrefix = "system.buckets."_sd;
+
// Namespace for storing configuration data, which needs to be replicated if the server is
// running as a replica set. Documents in this collection should represent some configuration
// state of the server, which needs to be recovered/consulted at startup. Each document in this
@@ -308,6 +311,16 @@ public:
bool isTemporaryReshardingCollection() const;
/**
+ * Returns whether the specified namespace is <database>.system.buckets.<>.
+ */
+ bool isTimeseriesBucketsCollection() const;
+
+ /**
+ * Returns the time-series buckets namespace for this view.
+ */
+ NamespaceString makeTimeseriesBucketsNamespace() 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.