The PlanCache currently stores BSONObj owned by the FindCommandRequest in debugInfo entries. In the case that the FindCommandRequest was built Once cached, these entries can outlive the original request and the debugInfo filter and sort will point to unowned memory. Both should be made owned as part of populating the debugInfo.
This only exists in 5.0 and master only as it was introduced recently with a change to use IDL to parse the find command.
- related to
-
SERVER-53060 Remove QueryRequest class
- Closed
-
SERVER-59841 Consider whether ownership should be enforced by the IDL for owned types
- Backlog