diff options
author | Hugh Tong <hugh.tong@mongodb.com> | 2023-05-15 15:28:20 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-15 18:00:33 +0000 |
commit | b45d9b1215bedf4328bded55913475dd6b589e92 (patch) | |
tree | ae2f4299360c4b930fef4935535a95b99fb2e002 /src/mongo/db/pipeline/document_source_coll_stats.cpp | |
parent | f1ac91d1e2db63009bd9f41d068f09f009c024cf (diff) | |
download | mongo-b45d9b1215bedf4328bded55913475dd6b589e92.tar.gz |
SERVER-76634 Add SerializationContext object to ExpressionContext
Diffstat (limited to 'src/mongo/db/pipeline/document_source_coll_stats.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_coll_stats.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mongo/db/pipeline/document_source_coll_stats.cpp b/src/mongo/db/pipeline/document_source_coll_stats.cpp index 1df5e681484..12413358639 100644 --- a/src/mongo/db/pipeline/document_source_coll_stats.cpp +++ b/src/mongo/db/pipeline/document_source_coll_stats.cpp @@ -65,8 +65,15 @@ intrusive_ptr<DocumentSource> DocumentSourceCollStats::createFromBson( uassert(40166, str::stream() << "$collStats must take a nested object but found: " << specElem, specElem.type() == BSONType::Object); - auto spec = - DocumentSourceCollStatsSpec::parse(IDLParserContext(kStageName), specElem.embeddedObject()); + + // TODO SERVER-77056: add assertion to validate pExpCtx->serializationCtxt != stateDefault() + + auto spec = DocumentSourceCollStatsSpec::parse( + IDLParserContext(kStageName, + false /* apiStrict */, + pExpCtx->ns.tenantId(), + SerializationContext::stateCommandReply(pExpCtx->serializationCtxt)), + specElem.embeddedObject()); return make_intrusive<DocumentSourceCollStats>(pExpCtx, std::move(spec)); } @@ -79,7 +86,7 @@ BSONObj DocumentSourceCollStats::makeStatsForNs( BSONObjBuilder builder; // We need to use the serialization context from the request when calling - // NamespaceStringUtil to build the reply + // NamespaceStringUtil to build the reply. builder.append( "ns", NamespaceStringUtil::serialize( |