Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35515

MatchExpression trees should hold children by unique_ptr

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Query Optimization

      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.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: