<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:21:59 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-50177] snapshot_read_at_cluster_time_crud_operations.js fails with CursorNotFound</title>
                <link>https://jira.mongodb.org/browse/SERVER-50177</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Similar to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-49880&quot; title=&quot;snapshot_read_at_cluster_time_crud_operations.js should expect error code Interrupted&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-49880&quot;&gt;&lt;del&gt;SERVER-49880&lt;/del&gt;&lt;/a&gt;. At random times, fsm_workloads/snapshot_read_at_cluster_time_crud_operations.js searches currentOp for getMore operations and calls killOp on them, which causes them to fail with &quot;ShutdownInProgress&quot; or &quot;Interrupted&quot;. Sometimes, getMore fails with CursorNotFound (see Suganthi&apos;s explanation below). Update the test to handle this scenario.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1434919">SERVER-50177</key>
            <summary>snapshot_read_at_cluster_time_crud_operations.js fails with CursorNotFound</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="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="jesse@mongodb.com">A. Jesse Jiryu Davis</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Aug 2020 12:52:50 +0000</created>
                <updated>Sun, 29 Oct 2023 22:04:42 +0000</updated>
                            <resolved>Wed, 16 Dec 2020 21:14:39 +0000</resolved>
                                                    <fixVersion>4.9.0</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="3533335" author="xgen-internal-githook" created="Wed, 16 Dec 2020 20:49:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50177&quot; title=&quot;snapshot_read_at_cluster_time_crud_operations.js fails with CursorNotFound&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50177&quot;&gt;&lt;del&gt;SERVER-50177&lt;/del&gt;&lt;/a&gt; snapshot_read_at_cluster_time_crud_operations.js should expect CursorNotFound&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/6ee6a9d6f6ff15fc65bf13baeab3717dfb72eb20&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/6ee6a9d6f6ff15fc65bf13baeab3717dfb72eb20&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3527073" author="jesse" created="Sun, 13 Dec 2020 00:10:47 +0000"  >&lt;p&gt;Reopening the original CR.&lt;/p&gt;</comment>
                            <comment id="3500289" author="lingzhi.deng" created="Fri, 20 Nov 2020 18:17:22 +0000"  >&lt;p&gt;This makes sense. Thanks for the investigation, Suganthi.&lt;/p&gt;</comment>
                            <comment id="3500140" author="suganthi.mani" created="Fri, 20 Nov 2020 17:13:14 +0000"  >&lt;p&gt;I think, the original patch in &lt;a href=&quot;http://mongodbcr.appspot.com/637200001&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this &lt;/a&gt; CR got abandoned due to the below question raised by &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=lingzhi.deng&quot; class=&quot;user-hover&quot; rel=&quot;lingzhi.deng&quot;&gt;lingzhi.deng&lt;/a&gt; in the CR&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;I think killOp only interrupts the operations in progress. And yes, the&lt;br/&gt;
 interrupted getMore would clean up the cursor. But then the getMore should get&lt;br/&gt;
 an Interrupted error and the test should stop running getMore using the same&lt;br/&gt;
 cursor:&lt;br/&gt;
 &lt;a href=&quot;https://github.com/mongodb/mongo/blob/915402884c52da861b1660cd6a7172c552ce1806/jstests/concurrency/fsm_workload_helpers/snapshot_read_utils.js#L158-L160&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/915402884c52da861b1660cd6a7172c552ce1806/jstests/concurrency/fsm_workload_helpers/snapshot_read_utils.js#L158-L160&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Am I missing something here? I have concerns adding CursorNotFound as an&lt;br/&gt;
 expected error code here because this might mask out real server bugs in cases&lt;br/&gt;
 where the server does mistakenly clean up in progress snapshot reads cursors&lt;br/&gt;
 when it shouldnt.&lt;/p&gt;

&lt;p&gt;If killOp is an issue here, I would probably prefer to give up the test&lt;br/&gt;
 coverages of interacting with killOp. But it is still not clear to me how&lt;br/&gt;
 exactly we got CursorNotFound.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;When a find/getMore command gets interrupted due to KillOp command after it has generated the batch result(say at &lt;a href=&quot;https://github.com/mongodb/mongo/blob/871848e83d1fed19a46e52a475c58d3bf528351a/src/mongo/db/commands/find_cmd.cpp#L545&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;line 545&lt;/a&gt;for find cmd and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/871848e83d1fed19a46e52a475c58d3bf528351a/src/mongo/db/commands/getmore_cmd.cpp#L715&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;line 715&lt;/a&gt; for getMore cmd), the result returned by find/getMore command will have cursor.id in response data. But, when&#160;&lt;tt&gt;ClientCursorPin&lt;/tt&gt; destructor is called, the find/getMore notices that it got interrupted which makes it to&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/871848e83d1fed19a46e52a475c58d3bf528351a/src/mongo/db/cursor_manager.cpp#L222-L228&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;remove&lt;/a&gt; the cursor id from the cursorMap and destroy the cursor. Only the subsequent getMore command will notice that cursor id is not in the cursorMap and would return &lt;a href=&quot;https://github.com/mongodb/mongo/blob/871848e83d1fed19a46e52a475c58d3bf528351a/src/mongo/db/cursor_manager.cpp#L164-L165&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ErrorCodes::CursorNotFound&lt;/a&gt;. So, it&apos;s valid for  &lt;a href=&quot;https://github.com/mongodb/mongo/blob/871848e83d1fed19a46e52a475c58d3bf528351a/jstests/concurrency/fsm_workloads/snapshot_read_at_cluster_time_crud_operations.js#L37&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this&lt;/a&gt; line in the test&#160;snapshot_read_at_cluster_time_crud_operations.js to fail with ErrorCodes::CursorNotFound.&#160; &lt;/p&gt;

&lt;p&gt;Reopening this ticket so that the closed CR can be made active again.&lt;br/&gt;
Note, we have similar test snapshot_read_kill_operations.js which also kills the find/getMore cmd  and ErrorCodes.CursorNotFound is an &lt;a href=&quot;https://github.com/mongodb/mongo/blob/871848e83d1fed19a46e52a475c58d3bf528351a/jstests/concurrency/fsm_workloads/snapshot_read_kill_operations.js#L42&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;acceptable error&lt;/a&gt; for the getMore cmd.&lt;/p&gt;</comment>
                            <comment id="3331684" author="jesse" created="Mon, 10 Aug 2020 21:58:33 +0000"  >&lt;p&gt;Closing this ticket and unassigning the BF from myself, perhaps someone else can see the problem from a fresh perspective.&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="1420600">SERVER-49880</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>2.0</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>Tue, 22 Sep 2020 17:29:24 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 8 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 8 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>12.0</customfieldvalue>

                        </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>jesse@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>lingzhi.deng@mongodb.com</customfieldvalue>
            <customfieldvalue>suganthi.mani@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxz5wf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxlwrb:</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="4474">Repl 2020-12-14</customfieldvalue>
    <customfieldvalue id="4475">Repl 2020-12-28</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|hxys5r:</customfieldvalue>

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