[SERVER-25473] mongos attempts to optimize a pipeline without having injected an expression context Created: 07/Aug/16  Updated: 13/Aug/16  Resolved: 11/Aug/16

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 3.3.11

Type: Bug Priority: Critical - P2
Reporter: Max Hirschhorn Assignee: Charlie Swanson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2016-08-29
Participants:
Linked BF Score: 0

 Description   

PipelineCommand::run() in cluster_pipeline_cmd.cpp calls Pipeline::parse() and then Pipeline::optimizePipeline() without resolving the collator and calling Pipeline::injectExpressionContext() in between.

// Parse and optimize the pipeline specification.
auto pipeline = Pipeline::parse(request.getValue().getPipeline(), mergeCtx);
if (!pipeline.isOK()) {
    return appendCommandStatus(result, pipeline.getStatus());
}
pipeline.getValue()->optimizePipeline();



 Comments   
Comment by Githook User [ 11/Aug/16 ]

Author:

{u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}

Message: SERVER-25473 Inject ExpressionContext before optimizing pipeline.
Branch: master
https://github.com/mongodb/mongo/commit/52cd830b7186f218c296222b89bafe3f1abe932e

Comment by Charlie Swanson [ 11/Aug/16 ]

Code review url: https://mongodbcr.appspot.com/87580001/

Generated at Thu Feb 08 04:09:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.