[DOCS-13247] Investigate changes in SERVER-44701: Remove support for the plan cache introspection commands Created: 26/Nov/19  Updated: 13/Nov/23  Resolved: 12/Feb/20

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.3.3, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-44701 Remove support for the plan cache int... Closed
documents SERVER-44823 Sharding support for $planCacheStats Closed
Duplicate
Participants:
Days since reply: 3 years, 44 weeks, 5 days ago
Epic Link: DOCS: 4.4 Server Release Work

 Description   

Description

Downstream Change Summary

The 'planCacheListPlans' command (https://docs.mongodb.com/manual/reference/command/planCacheListPlans/#dbcmd.planCacheListPlans) and 'planCacheListQueryShapes' command (https://docs.mongodb.com/manual/reference/command/planCacheListQueryShapes/#dbcmd.planCacheListQueryShapes) have been removed from the code base. They were deprecated in 4.2, and will be removed entirely in 4.4. We should note this in the 4.4 compatibility documentation, and also remove the reference pages. We expect users to migrate to the $planCacheStats aggregation source (https://docs.mongodb.com/manual/reference/operator/aggregation/planCacheStats/).

There are also changes to the plan cache helpers in the shell that need to be documented. The PlanCache.getPlansByQuery() shell helper (https://docs.mongodb.com/manual/reference/method/PlanCache.getPlansByQuery/#PlanCache.getPlansByQuery) has been deleted. Similarly, PlanCache.listQueryShapes() was deleted (https://docs.mongodb.com/manual/reference/method/PlanCache.listQueryShapes/#PlanCache.listQueryShapes).

Finally, this change adds a new plan cache helper to the shell called PlanCache.list(). It is sugar for $planCacheStats. It can be invoked as db.myCollection.getPlanCache().list() in order to obtain the entire contents of the plan cache for 'myCollection'. It optionally accepts a pipeline that can be used to transform the plan cache metadata using MQL, e.g. db.myCollection.getPlanCache().list([{$match: {queryHash: <hash>}}]).

I don't think drivers changes will be needed, but I'm clicking the box just in case so that they get notified of this change. As far as I know, only the shell implements helpers for the plan cache commands.

Description of Linked Ticket

These commands were deprecated in 4.2. They have been superseded by $planCacheStats, which has a superior output format and returns a cursor rather than a large document which could exceed the 16MB BSON size limit. Removing them will eliminate legacy code that the query team currently has to maintain.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 03/Apr/20 ]

Author:

{'name': 'Kay Kim', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-13247: 4.4 update command landing page for removed plan cache commands
Branch: master
https://github.com/mongodb/docs/commit/69818bb4b4566d39e75207a7e1c1c990932289fb

Comment by Githook User [ 12/Feb/20 ]

Author:

{'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}

Message: DOCS-13247: 4.4 plan cache changes
Branch: master
https://github.com/mongodb/docs/commit/d702c7c62104bc1b97e156038603488e0b4340c9

Generated at Thu Feb 08 08:07:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.