<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:22:00 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-50182] Open cursors can block cleanupOrphaned</title>
                <link>https://jira.mongodb.org/browse/SERVER-50182</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We run a sharded cluster. When trying to run cleanupOrphaned on some of those, the primary instance only logs the following:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;2020-08-06T08:19:03.481+0000 I SHARDING &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25449020&amp;#93;&lt;/span&gt; Deletion of XXX range [{ _id: MinKey }, { _id: -XXXXXXXX }) will be scheduled after all possibly dependent queries finish&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;We verified that no other operations are running on this shard with the following query:&lt;/p&gt;


&lt;p&gt;{{ db.currentOp().inprog.map(function (o) { if (o.ns === &quot;admin.$cmd&quot;) return &lt;/p&gt;
{ opid: o.opid, secs: o.secs_running, ns: o.ns, command: o.command }
&lt;p&gt; }).filter(Boolean)}}&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;Even after waiting for over an hour (the normal timeout for cleanupOrphaned) there is no feedback whatsoever.&lt;/tt&gt;&lt;br/&gt;
{{Is there anything we can do to successfully clean orphaned documents from the affected shards? }}&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;Thank you.&lt;/tt&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1435109">SERVER-50182</key>
            <summary>Open cursors can block cleanupOrphaned</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</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="13202">Works as Designed</resolution>
                                        <assignee username="eric.sedor@mongodb.com">Eric Sedor</assignee>
                                    <reporter username="leo@jodel.com">Leo Be</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Aug 2020 15:48:11 +0000</created>
                <updated>Fri, 27 Oct 2023 13:52:45 +0000</updated>
                            <resolved>Thu, 13 Aug 2020 16:17:36 +0000</resolved>
                                    <version>4.0.2</version>
                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="3337260" author="eric.sedor" created="Thu, 13 Aug 2020 16:17:01 +0000"  >&lt;p&gt;Thanks Leo, glad to hear. I&apos;m going to close this ticket as Working as Designed. There are tickets out there for improving cursor behavior but it&apos;s intentional that cleanupOrphaned and the RangeDeleter (mentioned in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-45367&quot; title=&quot;When the Range Deleter is waiting for the open cursors, list these cursors in the logs.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-45367&quot;&gt;&lt;del&gt;SERVER-45367&lt;/del&gt;&lt;/a&gt;) block in this way.&lt;/p&gt;</comment>
                            <comment id="3335939" author="JIRAUSER1255422" created="Thu, 13 Aug 2020 10:25:59 +0000"  >&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;restarting the primary did indeed help. The process is progressing now, thank you!&lt;/p&gt;

&lt;p&gt;Leo&lt;/p&gt;</comment>
                            <comment id="3328067" author="eric.sedor" created="Fri, 7 Aug 2020 16:38:25 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=leo%40jodel.com&quot; class=&quot;user-hover&quot; rel=&quot;leo@jodel.com&quot;&gt;leo@jodel.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;This issue is related to open cursors, not necessarily running operations on those cursors. Briefly, the range deleter blocks on open cursors to avoid conflict with those cursors. To get around this we suggest:&lt;/p&gt;

&lt;p&gt;1) Checking your code for &quot;noCursorTimeout&quot; and either avoiding its use or implementing guarantees that the app will consume all results from the cursor (so as to allow its closure).&lt;br/&gt;
2) Restart the node(s) that show this issue to ensure cursors are closed.&lt;br/&gt;
3) Try running cleanupOrphaned again.&lt;/p&gt;

&lt;p&gt;It&apos;s worth noting we improved this log line in MongoDB version 4.0.19 in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-45367&quot; title=&quot;When the Range Deleter is waiting for the open cursors, list these cursors in the logs.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-45367&quot;&gt;&lt;del&gt;SERVER-45367&lt;/del&gt;&lt;/a&gt;, so upgrading to that version is also a good idea. That version will also have many other fixes and improvements for the 4.0 series.&lt;/p&gt;

&lt;p&gt;Can you let us know if this addresses your issue?&lt;/p&gt;

&lt;p&gt;Eric&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1076433">SERVER-45367</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 7 Aug 2020 16:07:04 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 25 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>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, 25 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eric.sedor@mongodb.com</customfieldvalue>
            <customfieldvalue>leo@jodel.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxz727:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxlxrj:</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_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>
                                    <customfieldvalue><![CDATA[eric.sedor@mongodb.com]]></customfieldvalue>
    

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

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