<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:44:11 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[COMPASS-6739] Investigate changes in SERVER-45032: Allow $planCacheStats to target every shardsvr node in a sharded cluster</title>
                <link>https://jira.mongodb.org/browse/COMPASS-6739</link>
                <project id="13182" key="COMPASS">Compass </project>
                    <description>    &lt;div class=&quot;panel&quot; style=&quot;background-color: #c2d2c2;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;background-color: #239eb0;&quot;&gt;&lt;b&gt;Original Downstream Change Summary&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;    $planCacheStats aggregation stage has new parameter: allHosts.&lt;br/&gt;
Default value: false.&lt;/p&gt;

&lt;p&gt;When allHosts is false, $planCacheStats behaves as it used to. It follows read preference and will retrieve plan cache data from only targeted replica set node.&lt;br/&gt;
We have this documented here: &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/planCacheStats/#read-preference&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/docs/manual/reference/operator/aggregation/planCacheStats/#read-preference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Setting allHosts to true only supported in sharded clusters. If {$planCacheStats: {allHosts: true}} will be called on standalone or bare replica set, error will be returned during pipeline parsing:&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/pipeline/document_source_plan_cache_stats.cpp#L64&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/master/src/mongo/db/pipeline/document_source_plan_cache_stats.cpp#L64&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When allHosts is true mongos will broadcast $planCacheStats to all nodes, primary and secondaries, for each affected shard (every shard that have at least one chunk from target collection).&lt;/p&gt;

&lt;p&gt;It only works on sharded clusters, because on bare replica set there is no simple way to broadcast queries and then merge cursors. This should change in 8.0.&lt;/p&gt;

&lt;p&gt;For mongosh it may make sense to add options argument to PlanCache.list() function.&lt;/p&gt;
&lt;h2&gt;&lt;a name=&quot;DescriptionofLinkedTicket&quot;&gt;&lt;/a&gt;Description of Linked Ticket&lt;/h2&gt;
&lt;p&gt;    In &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44823&quot; title=&quot;Sharding support for $planCacheStats&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44823&quot;&gt;&lt;del&gt;SERVER-44823&lt;/del&gt;&lt;/a&gt;, we improved &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/aggregation/planCacheStats/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;$planCacheStats&lt;/a&gt; to be able to gather plan cache metadata from all of the shards in a sharded cluster. However, this operation uses the normal host targeting rules for selecting a single node in each shard. Unlike regular data, the plan cache metadata is not replicated and is local to each node. Rather than choose a single node from each shard, &lt;tt&gt;$planCacheStats&lt;/tt&gt; should be capable of targeting every data-bearing node in the cluster&#8212;that is, every node in every shard, excluding the config servers. &lt;/p&gt;

&lt;p&gt;Achieving this behavior may require some work in the underlying sharding infrastructure, since I&apos;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 &lt;a href=&quot;https://docs.mongodb.com/manual/core/read-preference/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;readPreference&lt;/a&gt; setting or with an explicit flag on the &lt;tt&gt;$planCacheStats&lt;/tt&gt; operation.&lt;/p&gt;

&lt;p&gt;Note that &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34633&quot; title=&quot;Allow $currentOp to retrieve operations from all members of each shard in a cluster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34633&quot;&gt;&lt;del&gt;SERVER-34633&lt;/del&gt;&lt;/a&gt; tracks a very similar improvement for the &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/aggregation/currentOp/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;$currentOp&lt;/a&gt; agg stage.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="2318341">COMPASS-6739</key>
            <summary>Investigate changes in SERVER-45032: Allow $planCacheStats to target every shardsvr node in a sharded cluster</summary>
                <type id="10501" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Investigation</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="backlog-server-pm">Backlog - Core Eng Program Management Team</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Apr 2023 10:21:00 +0000</created>
                <updated>Wed, 19 Apr 2023 13:55:20 +0000</updated>
                            <resolved>Wed, 19 Apr 2023 13:55:20 +0000</resolved>
                                                    <fixVersion>No version</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="5358910" author="jessica.sigafoos" created="Wed, 19 Apr 2023 13:55:20 +0000"  >&lt;p&gt;No impact on DevTools.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="1044576">SERVER-45032</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 19 Apr 2023 13:55:20 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        42 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-45032'>SERVER-45032</a></s>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>jessica.sigafoos@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            42 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-pm</customfieldvalue>
            <customfieldvalue>jessica.sigafoos@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i25c3z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1nngg:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i24y9b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>