<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:12:54 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>[SERVER-69219] Always broadcast queries using read concern level &quot;available&quot; to avoid missing unowned documents when filter includes equality on shard key fields</title>
                <link>https://jira.mongodb.org/browse/SERVER-69219</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Read concern level &quot;available&quot; is used to find unowned documents in a sharded cluster. Allowing these queries be targeted to a subset of the shards is counterproductive because it means unowned documents within a particular chunk range cannot be easily searched for.&lt;/p&gt;

&lt;p&gt;One workaround is to do an aggregation pipeline with {$replaceWith: &quot;$$ROOT&quot;} as it&apos;ll prevent the shard targeting optimization.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2123636">SERVER-69219</key>
            <summary>Always broadcast queries using read concern level &quot;available&quot; to avoid missing unowned documents when filter includes equality on shard key fields</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="nicholas.zolnierz@mongodb.com">Nicholas Zolnierz</assignee>
                                    <reporter username="max.hirschhorn@mongodb.com">Max Hirschhorn</reporter>
                        <labels>
                    </labels>
                <created>Sun, 28 Aug 2022 04:10:14 +0000</created>
                <updated>Thu, 20 Apr 2023 15:24:26 +0000</updated>
                            <resolved>Thu, 20 Apr 2023 15:24:26 +0000</resolved>
                                                                    <component>Distributed Query Planning</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="4804297" author="nicholas.zolnierz" created="Tue, 6 Sep 2022 13:23:28 +0000"  >&lt;p&gt;Thanks Max and Andy, I&apos;ve pinged &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=christopher.harris%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;christopher.harris@mongodb.com&quot;&gt;christopher.harris@mongodb.com&lt;/a&gt; to see if this change would be useful for TS debugging as it seems like there&apos;s no internal reason for us to do this. Will throw it back into the Needs Triage and discuss with the team.&lt;/p&gt;</comment>
                            <comment id="4804105" author="max.hirschhorn@10gen.com" created="Tue, 6 Sep 2022 12:17:06 +0000"  >&lt;p&gt;That&apos;s a good point the documentation only says &quot;may&quot; and so I was overzealous in calling this a bug. I&apos;d be happy to change the title and issue type so it reads as an improvement request.&lt;/p&gt;

&lt;p&gt;Looking through Jira for tickets related to counting unowned documents, I found &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-29879?focusedCommentId=1608240&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1608240&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt; mentioning a pattern to &quot;Count orphans in a given chunk or shard key range&quot;. I wonder how common that is for the Support team and/or Cluster Operator to run. I don&apos;t believe the $expr equivalent of the min/max fields in the find command has the same targeting behavior of broadcasting to all shards.&lt;/p&gt;

&lt;p&gt;As I had brought up in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57767&quot; title=&quot;dataSize command returns wrong number of documents when there are orphaned documents&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57767&quot;&gt;&lt;del&gt;SERVER-57767&lt;/del&gt;&lt;/a&gt;, I feel like now that read concern level &quot;available&quot; is no longer the default consistency level for secondary reads, we can repurpose it to truly mean &quot;return the state of the collection as it exists in the Btrees of the individual shards and for stronger read concern levels apply ownership filtering&quot;. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57767&quot; title=&quot;dataSize command returns wrong number of documents when there are orphaned documents&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57767&quot;&gt;&lt;del&gt;SERVER-57767&lt;/del&gt;&lt;/a&gt; ultimately got closed as Won&apos;t Do so I&apos;m also happy for this ticket to get closed too.&lt;/p&gt;</comment>
                            <comment id="4801620" author="schwerin" created="Mon, 5 Sep 2022 04:31:35 +0000"  >&lt;p&gt;I don&apos;t think this is particularly a priority, but also there&apos;s no real use case for today&apos;s &quot;available&quot; read concern. Because the targeting ignores shard versioning errors, you don&apos;t even know that the query will return all &lt;em&gt;non&lt;/em&gt; orphan documents. A chunk of collection that migrates to a shard that did not previously own documents for that collection might not be seen in a query at read concern &quot;available&quot;, e.g.&lt;/p&gt;

&lt;p&gt;We used to have &quot;available&quot; read concern by default on secondaries, but now that we do not, I do not expect any users are utilizing it.&lt;/p&gt;</comment>
                            <comment id="4798433" author="nicholas.zolnierz" created="Fri, 2 Sep 2022 15:59:33 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn@mongodb.com&quot;&gt;max.hirschhorn@mongodb.com&lt;/a&gt; can you clarify the priority for this behavior? Based on the docs, we &quot;may&quot; return orphan docs but it doesn&apos;t appear to be a strict requirement for RC available. &lt;/p&gt;

&lt;p&gt;We could certainly avoid any shard targetting from mongos with readConcern &quot;available&quot;, but wouldn&apos;t that hurt performance for users who don&apos;t really care about getting &lt;em&gt;all&lt;/em&gt; orphans?&lt;/p&gt;</comment>
                            <comment id="4787870" author="max.hirschhorn@10gen.com" created="Tue, 30 Aug 2022 13:37:11 +0000"  >&lt;p&gt;Andy noted that we would only want to consider addressing this in MongoDB 5.0+ where the default read concern level is now &quot;local&quot; so secondary reads outside of causally consistent sessions on older versions do not change to broadcasting.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2319869">SERVER-76353</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25126"><![CDATA[Query Optimization]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 2 Sep 2022 15:59:33 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 22 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_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>nicholas.zolnierz@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 22 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
            <customfieldvalue>nicholas.zolnierz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i18027:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0qr4g:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="5930">QE 2023-02-06</customfieldvalue>
    <customfieldvalue id="5932">QE 2023-02-20</customfieldvalue>
    <customfieldvalue id="6990">QE 2023-03-06</customfieldvalue>
    <customfieldvalue id="6992">QE 2023-03-20</customfieldvalue>
    <customfieldvalue id="6994">QE 2023-04-03</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_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i17m7j:</customfieldvalue>

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