<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:26:07 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-31138] ClusterClientCursorImpl isn&apos;t a safe raii type after releaseCursor</title>
                <link>https://jira.mongodb.org/browse/SERVER-31138</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The cluster client cursor impl returned by CursorEntry-&amp;gt;releaseCursor() isn&apos;t safe to destroy.  If it isn&apos;t put into a pinned cursor, it will invariant on destruction (due to getting cleaned up without actually being in the manager).&lt;/p&gt;

&lt;p&gt;We probably shouldn&apos;t have types like that (and mongod cursors don&apos;t work that way).&lt;/p&gt;</description>
                <environment></environment>
        <key id="428958">SERVER-31138</key>
            <summary>ClusterClientCursorImpl isn&apos;t a safe raii type after releaseCursor</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="george.wangensteen@mongodb.com">George Wangensteen</assignee>
                                    <reporter username="mira.carey@mongodb.com">Mira Carey</reporter>
                        <labels>
                            <label>query-44-grooming</label>
                    </labels>
                <created>Mon, 18 Sep 2017 19:19:53 +0000</created>
                <updated>Mon, 8 Jan 2024 15:22:59 +0000</updated>
                            <resolved>Fri, 9 Aug 2019 20:30:11 +0000</resolved>
                                                    <fixVersion>4.3.1</fixVersion>
                                    <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="2365383" author="xgen-internal-githook" created="Fri, 9 Aug 2019 20:29:18 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;George Wangensteen&apos;, &apos;email&apos;: &apos;george.wangensteen@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31138&quot; title=&quot;ClusterClientCursorImpl isn&amp;#39;t a safe raii type after releaseCursor&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31138&quot;&gt;&lt;del&gt;SERVER-31138&lt;/del&gt;&lt;/a&gt; ensure releaseCursor returns a RAII safe type&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a8af39c769926ee06dc6087cbeca8e3da5b943de&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a8af39c769926ee06dc6087cbeca8e3da5b943de&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2311028" author="misha.tyulenev" created="Wed, 3 Jul 2019 14:02:53 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.swanson&quot; class=&quot;user-hover&quot; rel=&quot;charlie.swanson&quot;&gt;charlie.swanson&lt;/a&gt; thanks, I agree that line 379 is problematic and &lt;tt&gt;releaseCursor&lt;/tt&gt; should not be available except constructing the PinnedCursor.&lt;/p&gt;</comment>
                            <comment id="2310387" author="charlie.swanson" created="Tue, 2 Jul 2019 21:38:55 +0000"  >&lt;p&gt;Came across this one again via &lt;a href=&quot;https://github.com/mongodb/mongo/blob/285c39607ee33aea0d6aff15cfaca37d0956ab50/src/mongo/s/query/cluster_cursor_manager.cpp#L368-L371&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this comment&lt;/a&gt;. In re-familiarizing myself with the problem it occurred to me that&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Line 379 is an early return which looks like it introduced the problem that comment was trying to prevent. Looks like &lt;a href=&quot;https://github.com/mongodb/mongo/commit/ffbaee1a4dcb47a307986cb696807fe979f4a39d#diff-09c6165fab791c6d79e8f9ab0963c326R325&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this was the commit which introduced it&lt;/a&gt; (cc &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=cheahuychou.mao&quot; class=&quot;user-hover&quot; rel=&quot;cheahuychou.mao&quot;&gt;cheahuychou.mao&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=misha.tyulenev&quot; class=&quot;user-hover&quot; rel=&quot;misha.tyulenev&quot;&gt;misha.tyulenev&lt;/a&gt;).&lt;/li&gt;
	&lt;li&gt;the offending line 371 could just construct the PinnedCursor that we eventually want to return. This wouldn&apos;t be easy to do since PinnedCursor doesn&apos;t have an operator-&amp;gt; or any way to get at the underlying ClusterClientCursor.&lt;/li&gt;
	&lt;li&gt;That last sentence is a strange fact. On mongod the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/285c39607ee33aea0d6aff15cfaca37d0956ab50/src/mongo/db/clientcursor.h#L504-L508&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ClientCursorPin class has a &apos;getCursor&apos; and operator-&amp;gt;&lt;/a&gt;, and the lack of these methods lead to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/285c39607ee33aea0d6aff15cfaca37d0956ab50/src/mongo/s/query/cluster_cursor_manager.cpp#L116-L206&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;a bunch of boring boilerplate&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I would propose that we add an &apos;operator-&amp;gt;&apos; to ClusterClientCursor::PinnedCursor and remove the &apos;releaseCursor()&apos; API except within the constructor of a PinnedCursor (via a friend function or some other C++ mechanism). I think that would prevent this type of bug from being reintroduced.&lt;/p&gt;

&lt;p&gt;Re-flagging this for scheduling since I think it&apos;s probably something an intern could pick off and there&apos;s probably actually a bug there now.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="428628">SERVER-31120</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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000aAmtRIAS]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 30 Jul 2018 00:41:11 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 26 weeks, 5 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_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>
                            4 years, 26 weeks, 5 days 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>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>george.wangensteen@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>mira.carey@mongodb.com</customfieldvalue>
            <customfieldvalue>misha.tyulenev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htf2ev:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr746n:</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="2881">Query 2019-07-29</customfieldvalue>
    <customfieldvalue id="2882">Query 2019-08-12</customfieldvalue>
    <customfieldvalue id="2883">Query 2019-08-26</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|hteoi7:</customfieldvalue>

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