summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/catalog_stats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/catalog_stats.cpp')
-rw-r--r--src/mongo/db/catalog/catalog_stats.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mongo/db/catalog/catalog_stats.cpp b/src/mongo/db/catalog/catalog_stats.cpp
index ea7b4ee2276..d346e67f971 100644
--- a/src/mongo/db/catalog/catalog_stats.cpp
+++ b/src/mongo/db/catalog/catalog_stats.cpp
@@ -29,7 +29,7 @@
#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand
-#include "mongo/platform/basic.h"
+#include "mongo/db/catalog/catalog_stats.h"
#include "mongo/db/catalog/collection_catalog.h"
#include "mongo/db/catalog/database_holder.h"
@@ -37,7 +37,10 @@
#include "mongo/db/db_raii.h"
#include "mongo/logv2/log.h"
-namespace mongo {
+namespace mongo::catalog_stats {
+
+// Number of time-series collections requiring extended range support
+AtomicWord<int> requiresTimeseriesExtendedRangeSupport;
namespace {
class CatalogStatsSSS : public ServerStatusSection {
@@ -58,6 +61,7 @@ public:
int timeseries = 0;
int internalCollections = 0;
int internalViews = 0;
+ int timeseriesExtendedRange = 0;
void toBson(BSONObjBuilder* builder) const {
builder->append("collections", collections);
@@ -67,6 +71,9 @@ public:
builder->append("views", views);
builder->append("internalCollections", internalCollections);
builder->append("internalViews", internalViews);
+ if (timeseriesExtendedRange > 0) {
+ builder->append("timeseriesExtendedRange", timeseriesExtendedRange);
+ }
}
};
@@ -80,6 +87,7 @@ public:
stats.capped = catalogStats.userCapped;
stats.clustered = catalogStats.userClustered;
stats.internalCollections = catalogStats.internal;
+ stats.timeseriesExtendedRange = requiresTimeseriesExtendedRangeSupport.load();
const auto viewCatalogDbNames = catalog->getViewCatalogDbNames(opCtx);
for (const auto& tenantDbName : viewCatalogDbNames) {
@@ -106,4 +114,4 @@ public:
} catalogStatsSSS;
} // namespace
-} // namespace mongo
+} // namespace mongo::catalog_stats