diff options
Diffstat (limited to 'src/mongo/db/pipeline/document_source_plan_cache_stats.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source_plan_cache_stats.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/pipeline/document_source_plan_cache_stats.h b/src/mongo/db/pipeline/document_source_plan_cache_stats.h index 9e735f835af..f0cf248ae5b 100644 --- a/src/mongo/db/pipeline/document_source_plan_cache_stats.h +++ b/src/mongo/db/pipeline/document_source_plan_cache_stats.h @@ -36,7 +36,7 @@ namespace mongo { class DocumentSourcePlanCacheStats final : public DocumentSource { public: - static const char* kStageName; + static constexpr StringData kStageName = "$planCacheStats"_sd; class LiteParsed final : public LiteParsedDocumentSource { public: @@ -67,7 +67,8 @@ public: void assertSupportsReadConcern(const repl::ReadConcernArgs& readConcern) const { uassert(ErrorCodes::InvalidOptions, - str::stream() << "Aggregation stage " << kStageName + str::stream() << "Aggregation stage " + << DocumentSourcePlanCacheStats::kStageName << " requires read concern local but found " << readConcern.toString(), readConcern.getLevel() == repl::ReadConcernLevel::kLocalReadConcern); @@ -82,8 +83,6 @@ public: virtual ~DocumentSourcePlanCacheStats() = default; - GetNextResult getNext() override; - StageConstraints constraints( Pipeline::SplitState = Pipeline::SplitState::kUnsplit) const override { StageConstraints constraints{StreamType::kStreaming, @@ -105,7 +104,7 @@ public: } const char* getSourceName() const override { - return kStageName; + return DocumentSourcePlanCacheStats::kStageName.rawData(); } /** @@ -122,6 +121,8 @@ public: private: DocumentSourcePlanCacheStats(const boost::intrusive_ptr<ExpressionContext>& expCtx); + GetNextResult doGetNext() final; + Value serialize( boost::optional<ExplainOptions::Verbosity> explain = boost::none) const override { MONGO_UNREACHABLE; // Should call serializeToArray instead. |