diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-18 17:02:53 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-18 17:02:53 -0300 |
| commit | 959575a5ca598bf5f37fb5cebe7ed1d80d3d71f7 (patch) | |
| tree | acc8d60aedb12b70048e676e8a7349deb0010db8 /src/mongo/db/global_index_usage_tracker.cpp | |
| parent | 76588293975fc059cf076779e4283e6ffaf8afff (diff) | |
New upstream version 6.0.20upstream
Diffstat (limited to 'src/mongo/db/global_index_usage_tracker.cpp')
| -rw-r--r-- | src/mongo/db/global_index_usage_tracker.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/global_index_usage_tracker.cpp b/src/mongo/db/global_index_usage_tracker.cpp index 9308307e82a..18849b73254 100644 --- a/src/mongo/db/global_index_usage_tracker.cpp +++ b/src/mongo/db/global_index_usage_tracker.cpp @@ -44,6 +44,7 @@ static const std::string kHashed = "hashed"; static const std::string kId = "id"; static const std::string kNormal = "normal"; static const std::string kPartial = "partial"; +static const std::string kPrepareUnique = "prepareUnique"; static const std::string kSingle = "single"; static const std::string kSparse = "sparse"; static const std::string kText = "text"; @@ -62,6 +63,7 @@ std::map<std::string, IndexFeatureStats> makeFeatureMap() { map[kId]; map[kNormal]; map[kPartial]; + map[kPrepareUnique]; map[kSingle]; map[kSparse]; map[kText]; @@ -92,6 +94,7 @@ IndexFeatures IndexFeatures::make(const IndexDescriptor* desc, bool internal) { features.id = desc->isIdIndex(); features.internal = internal; features.partial = desc->isPartial(); + features.prepareUnique = desc->prepareUnique(); features.sparse = desc->isSparse(); features.ttl = desc->infoObj().hasField(IndexDescriptor::kExpireAfterSecondsFieldName); features.type = indexType; @@ -174,6 +177,9 @@ void GlobalIndexUsageTracker::_updateStatsForEachFeature(const IndexFeatures& fe if (features.partial) { update(&_indexFeatureToStats.at(kPartial)); } + if (features.prepareUnique) { + update(&_indexFeatureToStats.at(kPrepareUnique)); + } if (features.sparse) { update(&_indexFeatureToStats.at(kSparse)); } |
