-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Shell API
-
None
-
Not Needed
Problem Statement/Rationale
When connecting to MongoDB 4.0, mongosh cannot run PlanCache.list() because 4.0 does not implement the $planCacheStats aggregation stage. But, it also cannot run the old PlanCache.listQueryShapes() method because it's deprecated and not implemented.
Steps to Reproduce
1. Connect to MongoDB 4.0 (it can be a standalone)
2. run pc = db.collection.getPlanCache()
3. run pc.listQueryShapes(), notice it's not a function (see MONGOSH-937 for that bug)
4. run pc.PlanCacheQueryShapes(), note it's marked as deprecated
5. run pc.list() and note it fails because $planCacheStats is not implemented in 4.0
Expected Results
implement pc.listQueryShapes() for 4.0 users
if that is more work than we want to do, note in docs that you can run the planCacheListQueryShapes database command via the runCommand method to get the results
Actual Results
see above
- duplicates
-
MONGOSH-935 PlanCache does not work on 4.0
- Closed