[SERVER-59204] unowned filter BSONObj stored in PlanCache entry debugInfo Created: 09/Aug/21 Updated: 29/Oct/23 Resolved: 16/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.1.0, 5.0.2 |
| Fix Version/s: | 5.0.3, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | James Wahlin | Assignee: | James Wahlin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v5.0
|
||||||||||||||||||||
| Sprint: | QO 2021-08-23 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 148 | ||||||||||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by James Wahlin [ 08/Sep/21 ] |
|
We decided that the fix committed above is the correct one in light of IDL ownership semantics which don't guarantee that fields of "owned" types are always owned. I filed SERVER-59841 to track potential improvements to the IDL in regards to enforcing ownership. |
| Comment by Githook User [ 12/Aug/21 ] |
|
Author: {'name': 'James Wahlin', 'email': 'james@mongodb.com', 'username': 'jameswahlin'}Message: (cherry picked from commit fce8274e6d47ed28d915e8e2db5149876dbcae25) |
| Comment by Githook User [ 12/Aug/21 ] |
|
Author: {'name': 'James Wahlin', 'email': 'james@mongodb.com', 'username': 'jameswahlin'}Message: |