<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:49:48 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-38722] CollectionCloner should handle QueryPlanKilled on collection drop</title>
                <link>https://jira.mongodb.org/browse/SERVER-38722</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The &lt;tt&gt;CollectionCloner&lt;/tt&gt;, used in the first phase of initial sync, has code to interpret error codes from the &lt;tt&gt;getMore&lt;/tt&gt; command as indicative of a collection drop:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/bf58b1ab2abfb2a3ab7a86c154f9f5954ed6f98c/src/mongo/db/repl/collection_cloner.cpp#L576-L582&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/bf58b1ab2abfb2a3ab7a86c154f9f5954ed6f98c/src/mongo/db/repl/collection_cloner.cpp#L576-L582&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In 4.0 and older branches, it handles &lt;tt&gt;OperationFailed&lt;/tt&gt; and &lt;tt&gt;CursorNotFound&lt;/tt&gt;. However, collection drops can result in a &lt;tt&gt;getMore&lt;/tt&gt; returning &lt;tt&gt;QueryPlanKilled&lt;/tt&gt;. This error code should be handled as well. This was fixed in 4.1.7 by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37451&quot; title=&quot;Move all cursor ownership to the global cursor manager&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37451&quot;&gt;&lt;del&gt;SERVER-37451&lt;/del&gt;&lt;/a&gt;, but it still needs to be fixed in older branches. As part of moving &lt;tt&gt;ClientCursor&lt;/tt&gt; ownership to the global cursor manager, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37451&quot; title=&quot;Move all cursor ownership to the global cursor manager&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37451&quot;&gt;&lt;del&gt;SERVER-37451&lt;/del&gt;&lt;/a&gt; changed the server&apos;s behavior such that collection drops result in &lt;tt&gt;QueryPlanKilled&lt;/tt&gt; rather than &lt;tt&gt;CursorNotFound&lt;/tt&gt;. This necessitated an immediate fix in master in order to ensure that initial sync remains resilient to collection drops. This ticket tracks the remaining backport work.&lt;/p&gt;</description>
                <environment></environment>
        <key id="658742">SERVER-38722</key>
            <summary>CollectionCloner should handle QueryPlanKilled on collection drop</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13201">Fixed</resolution>
                                        <assignee username="david.storch@mongodb.com">David Storch</assignee>
                                    <reporter username="david.storch@mongodb.com">David Storch</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Dec 2018 14:59:36 +0000</created>
                <updated>Sun, 29 Oct 2023 22:25:32 +0000</updated>
                            <resolved>Thu, 28 Feb 2019 19:02:06 +0000</resolved>
                                    <version>3.4.19</version>
                    <version>3.6.10</version>
                    <version>4.0.6</version>
                                    <fixVersion>3.6.12</fixVersion>
                    <fixVersion>4.0.7</fixVersion>
                                    <component>Querying</component>
                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2172872" author="xgen-internal-githook" created="Wed, 6 Mar 2019 17:12:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;David Storch&apos;, &apos;username&apos;: &apos;dstorch&apos;, &apos;email&apos;: &apos;david.storch@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38722&quot; title=&quot;CollectionCloner should handle QueryPlanKilled on collection drop&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38722&quot;&gt;&lt;del&gt;SERVER-38722&lt;/del&gt;&lt;/a&gt; Make CollectionCloner tolerate QueryPlanKilled error on collection drop.&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/03e8ccfaa221646f58e79c53b705f8ea71c1101d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/03e8ccfaa221646f58e79c53b705f8ea71c1101d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2166579" author="david.storch" created="Thu, 28 Feb 2019 19:02:06 +0000"  >&lt;p&gt;The fix for this ticket will be included in the 4.0.7 release. This ensures that 4.0 nodes which are 4.0.7 and newer should be able to correctly tolerate collection drop when syncing from a 4.2 node.&lt;/p&gt;

&lt;p&gt;Note that in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37451&quot; title=&quot;Move all cursor ownership to the global cursor manager&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37451&quot;&gt;&lt;del&gt;SERVER-37451&lt;/del&gt;&lt;/a&gt;, we decided to make 4.2 nodes &lt;em&gt;always&lt;/em&gt; return &lt;tt&gt;QueryPlanKilled&lt;/tt&gt; in response to a collection drop, without gating this change on featureCompatibilityVersion. Therefore, 4.0.6 and older minor versions of 4.0 may fail to initial sync from a 4.2 node when a collection being cloned is dropped between getMore commands. Let&apos;s say that you have a 4.0.6 node which is initial syncing from a 4.2 node. While the CollectionCloner is cloning some collection, the collection is dropped between getMores. This will cause the collection clone to fail (and I think the initial sync attempt will have to restart?). Such a scenario could only occur during the 3.6 =&amp;gt; 4.0 upgrade if the collection was dropped &lt;em&gt;during&lt;/em&gt; the getMore, so the situation has gotten slightly worse for users who upgrade to 4.2 directly from 4.0.6 or an older minor release in the 4.0 series.&lt;/p&gt;

&lt;p&gt;Users who may drop a collection during initial sync, and who may initial sync a 4.0 node from a 4.2 node during the 4.0 =&amp;gt; 4.2 upgrade, should perform a minor version upgrade to at least 4.0.7 before attempting the major version upgrade to 4.2. I expect this situation to be unusual; most users should be able to upgrade directly to 4.2 from any 4.0 minor release.&lt;/p&gt;</comment>
                            <comment id="2166564" author="xgen-internal-githook" created="Thu, 28 Feb 2019 18:52:59 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;David Storch&apos;, &apos;username&apos;: &apos;dstorch&apos;, &apos;email&apos;: &apos;david.storch@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38722&quot; title=&quot;CollectionCloner should handle QueryPlanKilled on collection drop&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38722&quot;&gt;&lt;del&gt;SERVER-38722&lt;/del&gt;&lt;/a&gt; Make CollectionCloner tolerate QueryPlanKilled error on collection drop.&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c592fea5fa07a08a82c7e11f7cddbc0b17a98f40&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c592fea5fa07a08a82c7e11f7cddbc0b17a98f40&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2165279" author="judah.schvimer" created="Wed, 27 Feb 2019 20:54:57 +0000"  >&lt;p&gt;Since &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31267&quot; title=&quot;CollectionCloner fails if collection is dropped between getMore calls&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31267&quot;&gt;&lt;del&gt;SERVER-31267&lt;/del&gt;&lt;/a&gt; added the &lt;tt&gt;OperationFailed&lt;/tt&gt; and &lt;tt&gt;CursorNotFound&lt;/tt&gt; checks and it was not backported to 3.4, I think this should not be backported to 3.4 either.&lt;/p&gt;</comment>
                            <comment id="2165247" author="david.storch" created="Wed, 27 Feb 2019 20:43:23 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer&quot;&gt;judah.schvimer&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt;, given that &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31267&quot; title=&quot;CollectionCloner fails if collection is dropped between getMore calls&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31267&quot;&gt;&lt;del&gt;SERVER-31267&lt;/del&gt;&lt;/a&gt; was fixed in 3.6 and backport to 3.4 was declined, can you confirm that the backport of this ticket to 3.4 should be declined as well?&lt;/p&gt;

&lt;p&gt;The fix for this ticket applies cleanly on 4.0 and 3.6, so I do plan to backport it with your approval to these newest two stable branches.&lt;/p&gt;</comment>
                            <comment id="2103253" author="tess.avitabile" created="Wed, 2 Jan 2019 16:40:24 +0000"  >&lt;p&gt;I don&apos;t think this will backport cleanly to 3.4, since the check for OperationFailed and CursorNotFound was added in&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31267&quot; title=&quot;CollectionCloner fails if collection is dropped between getMore calls&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31267&quot;&gt;&lt;del&gt;SERVER-31267&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="2102830" author="judah.schvimer" created="Wed, 2 Jan 2019 00:03:37 +0000"  >&lt;p&gt;The &lt;tt&gt;CollectionCloner&lt;/tt&gt; code should be very similar in v3.4, so I&apos;d vote for it if it&apos;s a clean backport as expected.&lt;/p&gt;</comment>
                            <comment id="2097093" author="david.storch" created="Thu, 20 Dec 2018 15:09:19 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt;, yep, exactly. In fact, I think it might be the case that 4.0 raises QueryPlanKilled or CursorNotFound, but never OperationFailed. Thanks, I&apos;ll request backport, at least to 4.0. Should we backport even further back as well?&lt;/p&gt;</comment>
                            <comment id="2097090" author="tess.avitabile" created="Thu, 20 Dec 2018 15:06:42 +0000"  >&lt;p&gt;Are you saying that it&apos;s possible for 4.0 to raise QueryPlanKilled if there is a collection drop? If so, then yes, we would be interested in a backport for the second piece.&lt;/p&gt;</comment>
                            <comment id="2097081" author="david.storch" created="Thu, 20 Dec 2018 15:01:56 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=siyuan.zhou&quot; class=&quot;user-hover&quot; rel=&quot;siyuan.zhou&quot;&gt;siyuan.zhou&lt;/a&gt;, I believe there is a bug affecting 4.0. There are two pieces to this work:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Make query always raise QueryPlanKilled instead of OperationFailed in FCV 4.2.&lt;/li&gt;
	&lt;li&gt;Fix the CollectionCloner to tolerate QueryPlanKilled.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Are you interested in a backport for the second piece? The first piece cannot be backported, so the CollectionCloner must continue to handle CursorNotFound and OperationFailed in older branches.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="706993">DOCS-12519</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="613547">SERVER-37451</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>10.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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15640"><![CDATA[v4.0]]></customfieldvalue>
    <customfieldvalue key="15141"><![CDATA[v3.6]]></customfieldvalue>
    <customfieldvalue key="14340"><![CDATA[v3.4]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 20 Dec 2018 15:06:42 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 49 weeks 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1081</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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 49 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>tess.avitabile@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huh2zr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8hxb:</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="2788">Query 2019-02-25</customfieldvalue>
    <customfieldvalue id="2789">Query 2019-03-11</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|hugp93:</customfieldvalue>

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