diff options
author | Gregory Noma <gregory.noma@gmail.com> | 2021-04-29 12:41:24 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-04-29 17:04:20 +0000 |
commit | 9caac5e1856eea2c9152a09f966c80b2a5b1c1c0 (patch) | |
tree | b7a0ea286d36efd7dec7d65fc5cd102bcc3f9462 /src/mongo/db/namespace_string.cpp | |
parent | bbf49c8019ec253013ad2df96951ab3201872d6a (diff) | |
download | mongo-9caac5e1856eea2c9152a09f966c80b2a5b1c1c0.tar.gz |
SERVER-56292 Ensure time-series collections properly handle stepdown and stepup
Diffstat (limited to 'src/mongo/db/namespace_string.cpp')
-rw-r--r-- | src/mongo/db/namespace_string.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/namespace_string.cpp b/src/mongo/db/namespace_string.cpp index 6f1b7c63622..9c6d9ae93bd 100644 --- a/src/mongo/db/namespace_string.cpp +++ b/src/mongo/db/namespace_string.cpp @@ -328,6 +328,11 @@ NamespaceString NamespaceString::makeTimeseriesBucketsNamespace() const { return {db(), kTimeseriesBucketsCollectionPrefix.toString() + coll()}; } +NamespaceString NamespaceString::getTimeseriesViewNamespace() const { + invariant(isTimeseriesBucketsCollection()); + return {db(), coll().substr(kTimeseriesBucketsCollectionPrefix.size())}; +} + bool NamespaceString::isReplicated() const { if (isLocal()) { return false; |