[SERVER-45032] Allow $planCacheStats to target every shardsvr node in a sharded cluster Created: 09/Dec/19 Updated: 29/Oct/23 Resolved: 19/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework, Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | Ivan Fefer |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | qexec-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Description |
|
In Achieving this behavior may require some work in the underlying sharding infrastructure, since I'm not aware of any other pre-existing sharded operation that targets every node in the cluster. Also, this could be a very expensive operation for large sharded clusters, so we should consider having users opt into this behavior explicitly, perhaps with a new readPreference setting or with an explicit flag on the $planCacheStats operation. Note that |
| Comments |
| Comment by Githook User [ 19/Apr/23 ] |
|
Author: {'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}Message: |
| Comment by Eric Milkie [ 14/Apr/23 ] |
|
And yes, I think the only way to implement this for every node in a sharded cluster would be to implement it for replica sets. This will become moot once we make all replica sets single shards, anyway. |
| Comment by Eric Milkie [ 14/Apr/23 ] |
|
Actually I think that section of the docs is a disclaimer, warning users about an unexpected behavior. |
| Comment by Ivan Fefer [ 14/Apr/23 ] |
|
In docs we state that users should use readPreference to get plan cache from different parts of replica set: https://www.mongodb.com/docs/manual/reference/operator/aggregation/planCacheStats/#read-preference |
| Comment by Ivan Fefer [ 14/Apr/23 ] |
|
Should this ticket also affect $planCacheStats for replica sets? |
| Comment by Davis Haupt (Inactive) [ 10/Feb/23 ] |
|
Flagging for scheduling because after |
| Comment by Eric Milkie [ 09/Aug/22 ] |
|
Note that $indexStats has the same issue and could benefit from this work as well. |