[SERVER-21510] StageBuilder::build() should fail when given query solution created from "no op" expression Created: 17/Nov/15  Updated: 05/Feb/16  Resolved: 04/Jan/16

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.3.0

Type: Improvement Priority: Major - P3
Reporter: J Rassi Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QuInt E (01/11/16)
Participants:

 Description   

StageBuilder::build() should return an error (or trip an invariant) when given a QuerySolution created from a match predicate that includes a TextNoOpMatchExpression or a WhereNoOpMatchExpression. The query execution logic does not expect query solution nodes created from these expressions, and the execution tree created from such a query solution could generate incorrect results or crash the server.

There are currently no known ways to currently trigger this condition, but it is easy to introduce a regression by accident that triggers this (for example, by mistakenly passing an ExtensionsCallbackNoop object instead of a ExtensionsCallbackReal object to CanonicalQuery::canonicalize() in the wrong place).



 Comments   
Comment by Githook User [ 04/Jan/16 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-21510 trip invariant on attempt to create PlanStages with a no-op extension context
Branch: master
https://github.com/mongodb/mongo/commit/898818d5a299fa2eff01d3950d40c8512bab7f10

Generated at Thu Feb 08 03:57:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.