diff options
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.cpp | 12 |
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); } } } |
