[SERVER-74960] Filter out QE plans from planCacheStats Created: 16/Mar/23  Updated: 29/Oct/23  Resolved: 02/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Adrian Gonzalez Montemayor
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-74603 Filter out plans with QE operations f... Closed
Backwards Compatibility: Fully Compatible
Sprint: Security 2023-04-03
Participants:

 Description   

Mark plans as “sensitive” if they are a QE operation or QE state collection by checking if OpDebug::shouldOmitDiagnosticInformation == true. Filter these sensitive plans from the output of $planCacheStats.

This can be done by adding a "securityLevel" field to plans, set it to sensitive if it is in the categories listed above, and then filter these plans out. See https://github.com/markbenvenuto/mongo/commit/88cb47e5d3144e0f75a2d526ed6bc5392bdd5867 for very rough POC of where to change in the query code.

Now plans are not cached unless there are multiple index choices that can be used. For QE testing, we are going to have to write queries that are a mix of plaintext and encrypted fields in the same query.

See existing plan cache tests: jstests/noPassthrough/plan_cache_stats_agg_source.js for some ideas of how to trigger caching of QE queries (https://github.com/mongodb/mongo/blob/b185d04364c298e701943a1e800c4036ce8df6e7/jstests/noPassthrough/plan_cache_stats_agg_source.js#L1-L58



 Comments   
Comment by Githook User [ 01/Apr/23 ]

Author:

{'name': 'Adrian Gonzalez', 'email': 'adriangonzalezmontemayor@gmail.com', 'username': 'adriangzz'}

Message: SERVER-74960 Filter out QE plans from planCacheStats
Branch: master
https://github.com/mongodb/mongo/commit/8177dc0ecccc852f65519dcca19edb7556ceecb3

Generated at Thu Feb 08 06:28:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.