<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:28:20 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-31837] Recipient shard should not wait for `orphanCleanupDelaySecs`</title>
                <link>https://jira.mongodb.org/browse/SERVER-31837</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The &lt;tt&gt;orphanCleanupDelaySecs&lt;/tt&gt; parameter was added as part of the &quot;secondaries chunk-aware&quot; feature, so that chunk migration on a shard primary does&apos;t immediately rip-out documents from underneath queries running on the secondaries.&lt;/p&gt;

&lt;p&gt;It essentially has the same effect as if a cursor was open for 15 minutes on a donating shard&apos;s primary. Because of this, receiving a chunk back would block for up to 15 minutes. This is a change in behaviour between 3.4 and 3.6. In the same situation. In this case 3.4 would have &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8c9429d4a94b8c153e057cf18b955a66612f8100/src/mongo/db/s/migration_destination_manager.cpp#L612&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;wiped out the range&lt;/a&gt; from underneath the active queries.&lt;/p&gt;

&lt;p&gt;We should preserve the 3.4 behaviour.&lt;/p&gt;</description>
                <environment></environment>
        <key id="454899">SERVER-31837</key>
            <summary>Recipient shard should not wait for `orphanCleanupDelaySecs`</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="tommaso.tocci@mongodb.com">Tommaso Tocci</assignee>
                                    <reporter username="kaloian.manassiev@mongodb.com">Kaloian Manassiev</reporter>
                        <labels>
                            <label>car-investigation</label>
                            <label>oldshardingemea</label>
                            <label>sharding-emea-pm-review</label>
                            <label>shardingemea-qw</label>
                    </labels>
                <created>Mon, 6 Nov 2017 11:31:24 +0000</created>
                <updated>Tue, 6 Feb 2024 13:59:44 +0000</updated>
                                                                            <component>Sharding</component>
                                        <votes>4</votes>
                                    <watches>39</watches>
                                                                                                                <comments>
                            <comment id="2320720" author="josef.ahmad" created="Thu, 11 Jul 2019 08:46:10 +0000"  >&lt;p&gt;I think migrating the least-recently moved chunk only mitigates this issue marginally.&#160;In the rather common case of a monotonically changing shard key, the top chunk optimisation should bounce the top chunk around shards regardless of the balancer policy.&lt;/p&gt;</comment>
                            <comment id="2319642" author="kaloian.manassiev" created="Wed, 10 Jul 2019 15:39:29 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=josef.ahmad&quot; class=&quot;user-hover&quot; rel=&quot;josef.ahmad&quot;&gt;josef.ahmad&lt;/a&gt;, is it the max chunk that bounces back and forth or the min? Because from tracing how the balancer distribution is constructed, I &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4f2383c9041598dbf19523c43c170ee01f840145/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp#L83&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;can see that&lt;/a&gt; the chunks per shard mapping is in increasing key order and then the selection &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4f2383c9041598dbf19523c43c170ee01f840145/src/mongo/db/s/balancer/balancer_policy.cpp#L496&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;walks that list&lt;/a&gt; in the same order and picks the first chunk which matches. Therefore it should be picking the lowest key (which has the same issue as the max, so I am just double-checking here).&lt;/p&gt;

&lt;p&gt;With respect to this, do you think it might be a slightly better selection policy if we changed that logic to instead select the chunk, which has the lowest chunk version, since it moved least recently. I am wondering whether this will have some net negative consequences with respect to fragmentation for example or data hotness around the cluster. Although I can&apos;t think of how it could be any worse than picking the lowest chunk.&lt;/p&gt;</comment>
                            <comment id="1717641" author="schwerin" created="Mon, 6 Nov 2017 15:45:51 +0000"  >&lt;p&gt;This change would allow even short-running cursors on secondaries to miss documents if they ran long enough for a chunk to migrate away and begin to migrate back. Before removing the 15 minute wait, I think we should implement the behavior to kill cursors on secondaries that have read concern stronger than &quot;available&quot; before range deletion occurs.&lt;/p&gt;</comment>
                            <comment id="1717520" author="kaloian.manassiev" created="Mon, 6 Nov 2017 14:39:04 +0000"  >&lt;p&gt;The effect in 3.4 is not only restricted to secondaries. The chunk&apos;s contents will be ripped out from underneath cursors on the primaries as well due to the &lt;tt&gt;waitForOpenCursors = false&lt;/tt&gt; flag that the receive chunk code uses.&lt;/p&gt;</comment>
                            <comment id="1717518" author="schwerin" created="Mon, 6 Nov 2017 14:34:43 +0000"  >&lt;p&gt;But in 3.4 we only effectively offered &quot;available&quot; read concern on secondaries. This change would allow &quot;majority&quot; or &quot;local&quot; cursors on secondaries to behave like &quot;available&quot; cursors. The 15 minute delay insulated most clients from seeing that behavior, reducing the urgency of implementing the general solution.&lt;/p&gt;</comment>
                            <comment id="1717511" author="kaloian.manassiev" created="Mon, 6 Nov 2017 14:24:01 +0000"  >&lt;p&gt;No, because we only partially implemented the feature to kill cursors on the secondaries (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-29342&quot; title=&quot;CollectionShardingState to support oplog event StartRangeDeletion&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-29342&quot;&gt;&lt;del&gt;SERVER-29342&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;However, my argument for fixing this bug is that in 3.4 and earlier we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8c9429d4a94b8c153e057cf18b955a66612f8100/src/mongo/db/s/migration_destination_manager.cpp#L612&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;do not wait&lt;/a&gt; for queries to complete in this situation either.&lt;/p&gt;

&lt;p&gt;Note that this is the case where a chunk moves out of a shard and then part of it moves back in.&lt;/p&gt;</comment>
                            <comment id="1717505" author="schwerin" created="Mon, 6 Nov 2017 14:11:57 +0000"  >&lt;p&gt;Can you confirm that the cursors on the secondaries with read concern greater than &quot;available&quot; get killed before the orphan cleanup begins?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="386294">SERVER-29344</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="544507">SERVER-35009</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="593728">SERVER-36834</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="388554">SERVER-29405</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>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26387"><![CDATA[Catalog and Routing]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_23577" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>CAR Impact</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25716"><![CDATA[3 High (users + team + external teams)]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000cfX6xQAE, 500A000000cPwVuIAK, 5002K00000csGKuQAM, 5002K00000fNJn3QAG, 5002K00000j0dvIQAQ, 5002K00000npvOmQAI, 5006R00001nreLRQAY, 5006R00001rZxjzQAC, 5006R00001tKfqZQAS, 5006R00001uNyY5QAK]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 6 Nov 2017 14:11:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 30 weeks, 6 days 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-29344'>SERVER-29344</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_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>connie.chen@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 30 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>josef.ahmad@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>tommaso.tocci@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htjcgf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9027:</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="2063">Sharding 2017-12-18</customfieldvalue>
    <customfieldvalue id="8006">CAR Team 2024-01-22</customfieldvalue>
    <customfieldvalue id="8007">CAR Team 2024-02-05</customfieldvalue>
    <customfieldvalue id="8008">CAR Team 2024-02-19</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </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|htiyk7:</customfieldvalue>

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