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/expression_context.cpp | |
parent | f1ac91d1e2db63009bd9f41d068f09f009c024cf (diff) | |
download | mongo-b45d9b1215bedf4328bded55913475dd6b589e92.tar.gz |
SERVER-76634 Add SerializationContext object to ExpressionContext
Diffstat (limited to 'src/mongo/db/pipeline/expression_context.cpp')
-rw-r--r-- | src/mongo/db/pipeline/expression_context.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mongo/db/pipeline/expression_context.cpp b/src/mongo/db/pipeline/expression_context.cpp index c171cca3cda..041e4642717 100644 --- a/src/mongo/db/pipeline/expression_context.cpp +++ b/src/mongo/db/pipeline/expression_context.cpp @@ -77,7 +77,8 @@ ExpressionContext::ExpressionContext(OperationContext* opCtx, {}, // resolvedNamespaces findCmd.getNamespaceOrUUID().uuid(), findCmd.getLet(), - mayDbProfile) {} + mayDbProfile, + findCmd.getSerializationContext()) {} ExpressionContext::ExpressionContext(OperationContext* opCtx, const AggregateCommandRequest& request, @@ -101,7 +102,8 @@ ExpressionContext::ExpressionContext(OperationContext* opCtx, std::move(resolvedNamespaces), std::move(collUUID), request.getLet(), - mayDbProfile) { + mayDbProfile, + request.getSerializationContext()) { if (request.getIsMapReduceCommand()) { // mapReduce command JavaScript invocation is only subject to the server global @@ -126,7 +128,8 @@ ExpressionContext::ExpressionContext( StringMap<ExpressionContext::ResolvedNamespace> resolvedNamespaces, boost::optional<UUID> collUUID, const boost::optional<BSONObj>& letParameters, - bool mayDbProfile) + bool mayDbProfile, + const SerializationContext& serializationCtx) : explain(explain), fromMongos(fromMongos), needsMerge(needsMerge), @@ -134,6 +137,7 @@ ExpressionContext::ExpressionContext( !(opCtx && opCtx->readOnly())), // Disallow disk use if in read-only mode. bypassDocumentValidation(bypassDocumentValidation), ns(ns), + serializationCtxt(serializationCtx), uuid(std::move(collUUID)), opCtx(opCtx), mongoProcessInterface(mongoProcessInterface), @@ -242,7 +246,8 @@ boost::intrusive_ptr<ExpressionContext> ExpressionContext::copyWith( _resolvedNamespaces, uuid, boost::none /* letParameters */, - mayDbProfile); + mayDbProfile, + SerializationContext()); expCtx->inMongos = inMongos; expCtx->maxFeatureCompatibilityVersion = maxFeatureCompatibilityVersion; @@ -263,6 +268,7 @@ boost::intrusive_ptr<ExpressionContext> ExpressionContext::copyWith( expCtx->originalAggregateCommand = originalAggregateCommand.getOwned(); expCtx->inLookup = inLookup; + expCtx->serializationCtxt = serializationCtxt; // Note that we intentionally skip copying the value of '_interruptCounter' because 'expCtx' is // intended to be used for executing a separate aggregation pipeline. |