[SERVER-35515] MatchExpression trees should hold children by unique_ptr Created: 08/Jun/18  Updated: 26/Jan/24  Resolved: 26/Jan/24

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

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: Backlog - Query Optimization
Resolution: Duplicate Votes: 0
Labels: storch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-55183 Fix owning raw pointers in matcher/ Closed
Related
is related to SERVER-35455 QueryPlannerAccess should hold owned ... Closed
is related to SERVER-35512 QuerySolutionNode should hold its chi... Closed
Assigned Teams:
Query Optimization
Participants:

 Description   

ListOfMatchExpression holds its children by owned raw pointer:

https://github.com/mongodb/mongo/blob/c60ee7dd4244f58659f436ca54c68987637911e8/src/mongo/db/matcher/expression_tree.h#L104

Instead, the children should be a std::vector<std::unique_ptr<MatchExpression>>. We should also audit the other MatchExpression subclasses to see if there are remaining uses of owned raw pointers.



 Comments   
Comment by David Storch [ 26/Jan/24 ]

Looks like this was fixed by jacob.evans@mongodb.com in SERVER-55183. Resolving as a duplicate.

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