diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2023-04-04 11:26:53 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-04 17:16:13 +0000 |
commit | 2d5b6fb51af722de35c34678c8d146743bc52190 (patch) | |
tree | 451194fd2cacc75dbe16d2d67ab0a1c345d29f16 /src/mongo/s/query/cluster_aggregate.cpp | |
parent | 05794b52523f287f828a8fa692ac3f3ed6cd5dd1 (diff) | |
download | mongo-2d5b6fb51af722de35c34678c8d146743bc52190.tar.gz |
SERVER-75265 Improve queryable encryption handling in curop
Diffstat (limited to 'src/mongo/s/query/cluster_aggregate.cpp')
-rw-r--r-- | src/mongo/s/query/cluster_aggregate.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mongo/s/query/cluster_aggregate.cpp b/src/mongo/s/query/cluster_aggregate.cpp index 11959054983..6130a80c1fa 100644 --- a/src/mongo/s/query/cluster_aggregate.cpp +++ b/src/mongo/s/query/cluster_aggregate.cpp @@ -410,12 +410,15 @@ Status ClusterAggregate::runAggregate(OperationContext* opCtx, // If the aggregate command supports encrypted collections, do rewrites of the pipeline to // support querying against encrypted fields. if (shouldDoFLERewrite) { - // After this rewriting, the encryption info does not need to be kept around. - pipeline = processFLEPipelineS(opCtx, - namespaces.executionNss, - request.getEncryptionInformation().value(), - std::move(pipeline)); - request.setEncryptionInformation(boost::none); + if (!request.getEncryptionInformation()->getCrudProcessed().value_or(false)) { + pipeline = processFLEPipelineS(opCtx, + namespaces.executionNss, + request.getEncryptionInformation().value(), + std::move(pipeline)); + request.getEncryptionInformation()->setCrudProcessed(true); + } + + CurOp::get(opCtx)->debug().shouldOmitDiagnosticInformation = true; } pipeline->optimizePipeline(); |