summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_plan_cache_stats.cpp
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
commit4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch)
tree1682a647d4463397c119183369ae6f750d5fdcff /src/mongo/db/pipeline/document_source_plan_cache_stats.cpp
parentaa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff)
parent8f0827553e09872941945a093b647a4211a9db7f (diff)
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0' with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'src/mongo/db/pipeline/document_source_plan_cache_stats.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_plan_cache_stats.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mongo/db/pipeline/document_source_plan_cache_stats.cpp b/src/mongo/db/pipeline/document_source_plan_cache_stats.cpp
index f49a3cba01f..51f7bf3d650 100644
--- a/src/mongo/db/pipeline/document_source_plan_cache_stats.cpp
+++ b/src/mongo/db/pipeline/document_source_plan_cache_stats.cpp
@@ -57,13 +57,9 @@ DocumentSourcePlanCacheStats::DocumentSourcePlanCacheStats(
const boost::intrusive_ptr<ExpressionContext>& expCtx)
: DocumentSource(kStageName, expCtx) {}
-void DocumentSourcePlanCacheStats::serializeToArray(std::vector<Value>& array,
- const SerializationOptions& opts) const {
- if (opts.verbosity) {
- tassert(7513100,
- "$planCacheStats is not equipped to serialize in explain mode with redaction on",
- !opts.transformIdentifiers &&
- opts.literalPolicy == LiteralSerializationPolicy::kUnchanged);
+void DocumentSourcePlanCacheStats::serializeToArray(
+ std::vector<Value>& array, boost::optional<ExplainOptions::Verbosity> explain) const {
+ if (explain) {
array.push_back(Value{
Document{{kStageName,
Document{{"match"_sd,
@@ -71,7 +67,7 @@ void DocumentSourcePlanCacheStats::serializeToArray(std::vector<Value>& array,
} else {
array.push_back(Value{Document{{kStageName, Document{}}}});
if (_absorbedMatch) {
- _absorbedMatch->serializeToArray(array, opts);
+ _absorbedMatch->serializeToArray(array);
}
}
}