<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:36:58 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-77916] Provide an API that indicates an approximate number of orphans on a shard</title>
                <link>https://jira.mongodb.org/browse/SERVER-77916</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;As part of the &lt;a href=&quot;https://jira.mongodb.org/browse/WRITING-9735&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;scope&lt;/a&gt; for PM-2650, the query team is requesting the shard team for an API that indicates an approximate fraction of documents that are orphans (scheduled to be deleted by the range deleter, but in the current snapshot will be returned by a collection/index scan). This information will be used during query planning to estimate the cost of different access paths.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2362546">SERVER-77916</key>
            <summary>Provide an API that indicates an approximate number of orphans on a shard</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="matt.panton@mongodb.com">Matt Panton</assignee>
                                    <reporter username="ben.shteinfeld@mongodb.com">Ben Shteinfeld</reporter>
                        <labels>
                            <label>sharding-product-sync</label>
                    </labels>
                <created>Thu, 8 Jun 2023 14:53:41 +0000</created>
                <updated>Thu, 13 Jul 2023 16:07:45 +0000</updated>
                            <resolved>Thu, 13 Jul 2023 16:07:45 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="5564197" author="JIRAUSER1269946" created="Thu, 13 Jul 2023 16:07:45 +0000"  >&lt;p&gt;Discussed offline with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=matt.panton%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;matt.panton@mongodb.com&quot;&gt;matt.panton@mongodb.com&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jordi.serra-torrens%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;jordi.serra-torrens@mongodb.com&quot;&gt;jordi.serra-torrens@mongodb.com&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=xiaochen.wu%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;xiaochen.wu@mongodb.com&quot;&gt;xiaochen.wu@mongodb.com&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.storch%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;david.storch@mongodb.com&quot;&gt;david.storch@mongodb.com&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=richard.hausman%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;richard.hausman@mongodb.com&quot;&gt;richard.hausman@mongodb.com&lt;/a&gt;. Because we expect the number of orphans to be very low in the majority of cases, and because we chose to represent shard filtering in the physical plan space (which doesn&apos;t have cardinality estimation), we decided that cardinality estimation of shard filtering is not worth the effort and provides very little value. We will just assume that the selectivity of shard filtering is 100%. As a result, this request is now obsolete and I&apos;m closing it as &quot;Won&apos;t fix&quot;.&lt;/p&gt;

&lt;p&gt;If in the future, we find that our assumption around the costing of shard filtering is causing suboptimal plans to be chosen, we may revisit this assumption then.&lt;/p&gt;</comment>
                            <comment id="5492226" author="JIRAUSER1269946" created="Mon, 12 Jun 2023 15:32:42 +0000"  >&lt;p&gt;I think wrapping it in to one API with the semantics of 0% means definite is ok if that is preferable for you. Your question about yield/restore made me think more about what the semantics of this API will actually be. How long will the information returned by the API remain true? If it says there are no orphans, will this be true for the duration of: the operation context, as long as the collection is locked, no guarantee?&lt;/p&gt;

&lt;p&gt;My understanding of the current implementation in the the classic engine is that yield/restore will perform a shard version check when restoring and re-acquiring the collection pointer, &lt;a href=&quot;https://github.com/10gen/mongo/blob/0228455f9e5b701ab2749b2f395339d065e3a98c/src/mongo/db/db_raii.cpp#L996&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;code pointer&lt;/a&gt;.&#160; This means that if orphans appeared, then the shard version check should fail and throw, and we&apos;ll retry the query. If this understanding if correct, how would the situation which you described above occur?&lt;/p&gt;</comment>
                            <comment id="5485119" author="kaloian.manassiev" created="Thu, 8 Jun 2023 15:08:51 +0000"  >&lt;p&gt;Can this be the same API as that of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-77914&quot; title=&quot;Provide an API that indicates whether a shard can have orphans&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-77914&quot;&gt;SERVER-77914&lt;/a&gt; just that the zero is &quot;definite&quot; but more than zero is not.&lt;/p&gt;

&lt;p&gt;Also &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ben.shteinfeld%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;ben.shteinfeld@mongodb.com&quot;&gt;ben.shteinfeld@mongodb.com&lt;/a&gt;, do you require some kind of notification post-yield/restore to tell you that orphans have now appeared? Basically related to the thread that I had put in the scope for what happens if you plan for no orphans and then they appear.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2362536">SERVER-77914</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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25133"><![CDATA[Sharding EMEA]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 8 Jun 2023 15:08:51 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        29 weeks, 6 days 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>ben.shteinfeld@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            29 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>ben.shteinfeld@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>matt.panton@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2cwaf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1v47s:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="7190">Sharding EMEA 2023-07-10</customfieldvalue>
    <customfieldvalue id="7191">Sharding EMEA 2023-07-24</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|i2cifr:</customfieldvalue>

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