<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:21:05 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-49876] Fix always-false if statement in CatalogCache</title>
                <link>https://jira.mongodb.org/browse/SERVER-49876</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We check if the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/6fcd9a01f91983750c5a0058393fcb0c55bce642/src/mongo/s/catalog_cache.cpp#L788-L792&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;existingRoutingInfo exists&lt;/a&gt; when attempting to reset stale shards. It will never exist, because we&apos;ve &lt;a href=&quot;https://github.com/mongodb/mongo/blob/6fcd9a01f91983750c5a0058393fcb0c55bce642/src/mongo/s/catalog_cache.cpp#L770&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;std::moved the shared pointer into refreshCollectionRoutingInfo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We should figure out a way to achieve the desired behavior while maintaining the std::move semantics.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1420514">SERVER-49876</key>
            <summary>Fix always-false if statement in CatalogCache</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="13203">Gone away</resolution>
                                        <assignee username="kaloian.manassiev@mongodb.com">Kaloian Manassiev</assignee>
                                    <reporter username="blake.oler@mongodb.com">Blake Oler</reporter>
                        <labels>
                            <label>bkp</label>
                            <label>sharding-wfbf-sprint</label>
                    </labels>
                <created>Fri, 24 Jul 2020 18:43:45 +0000</created>
                <updated>Fri, 27 Oct 2023 20:42:09 +0000</updated>
                            <resolved>Fri, 26 Nov 2021 16:25:14 +0000</resolved>
                                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4212983" author="kaloian.manassiev" created="Fri, 26 Nov 2021 16:24:51 +0000"  >&lt;p&gt;Given that this project has been disabled since 4.4 and we rewrote the caching layer in 5.0 to be built on top of the ReadThroughCache, I don&apos;t believe that this problem exists anymore, because before returning a new &lt;tt&gt;ChunkManager&lt;/tt&gt; from the&#160;lookup function we do &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4a8d23f5382749a398af3a6cb01ec2df0b28f8e2/src/mongo/s/catalog_cache.cpp#L743&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;set all shards as refreshed&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="3553062" author="acm" created="Thu, 7 Jan 2021 17:14:44 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=blake.oler&quot; class=&quot;user-hover&quot; rel=&quot;blake.oler&quot;&gt;blake.oler&lt;/a&gt; - I agree with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev&quot;&gt;kaloian.manassiev&lt;/a&gt;, in that I think you need to evaluate whether the fact that the logic in the conditional is unreachable represents a bug or not. What would happen if we failed to manually reset stale shards when we ought to, per the comment? If failing to do that manual reset is a bug with real consequences, then I think yes, this should be fixed on older branches.&lt;/p&gt;</comment>
                            <comment id="3552817" author="kaloian.manassiev" created="Thu, 7 Jan 2021 16:15:46 +0000"  >&lt;p&gt;As long as it is not a bug I wouldn&apos;t bother changing the older versions &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="3552808" author="blake.oler" created="Thu, 7 Jan 2021 16:13:47 +0000"  >&lt;p&gt;This change no longer tracks on master because we&apos;ve gotten rid of both the affected code and the notion of a sequence number. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=acm&quot; class=&quot;user-hover&quot; rel=&quot;acm&quot;&gt;acm&lt;/a&gt;&#160;would you like us to target this fix for older versions, or just close as Gone Away?&lt;/p&gt;</comment>
                            <comment id="3380612" author="renctan" created="Tue, 8 Sep 2020 18:52:11 +0000"  >&lt;p&gt;Change sounds good to me&lt;/p&gt;</comment>
                            <comment id="3372321" author="blake.oler" created="Wed, 2 Sep 2020 14:34:08 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=renctan&quot; class=&quot;user-hover&quot; rel=&quot;renctan&quot;&gt;renctan&lt;/a&gt;&#160;ping&lt;/p&gt;</comment>
                            <comment id="3326243" author="blake.oler" created="Fri, 7 Aug 2020 13:21:10 +0000"  >&lt;p&gt;We need the std::move, because there&apos;s the possibility that we will &lt;a href=&quot;https://github.com/mongodb/mongo/blob/26166944f65eb4b1b3d4cfa29ddc1c0ee4e534b4/src/mongo/s/catalog_cache.cpp#L104-L112&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;end up using the same ChunkManager pointer&lt;/a&gt; at the move-site when swapping in the new one.&lt;/p&gt;

&lt;p&gt;To clarify, I meant that we can capture the sequence number locally before moving in the ChunkManager. &lt;/p&gt;</comment>
                            <comment id="3325619" author="renctan" created="Thu, 6 Aug 2020 21:32:38 +0000"  >&lt;p&gt;Hm... in places were the old ChunkManager is not readily available, wouldn&apos;t you end up creating a new shared_ptr for the ChunkManager? Would it be better if we just removed the std::move?&lt;/p&gt;</comment>
                            <comment id="3325483" author="blake.oler" created="Thu, 6 Aug 2020 20:33:32 +0000"  >&lt;p&gt;Proposed solution:&lt;/p&gt;

&lt;p&gt;In all places where we check for the existence of an already-moved old routing info, instead check if the old chunk manager&apos;s sequence number matches the new chunk manager&apos;s sequence number. &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=renctan&quot; class=&quot;user-hover&quot; rel=&quot;renctan&quot;&gt;renctan&lt;/a&gt; to approve.&lt;/p&gt;</comment>
                            <comment id="3301669" author="blake.oler" created="Fri, 24 Jul 2020 19:08:06 +0000"  >&lt;p&gt;I think there&apos;s a similar bug in the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/cb8d60119eaa7d639ae0670f1768edf231f9876d/src/mongo/s/write_ops/chunk_manager_targeter.cpp#L336-L355&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ChunkManagerTargeter&lt;/a&gt;. Noting here for posterity&apos;s sake. It might also be worth analyzing for other places in the codebase where we attempt to take action based on the existence of a routing info shared pointer after a refresh has been done.&lt;/p&gt;</comment>
                            <comment id="3301645" author="blake.oler" created="Fri, 24 Jul 2020 18:53:13 +0000"  >&lt;p&gt;Changed the header &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=acm&quot; class=&quot;user-hover&quot; rel=&quot;acm&quot;&gt;acm&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3301632" author="acm" created="Fri, 24 Jul 2020 18:47:30 +0000"  >&lt;p&gt;It isn&apos;t really a use-after-free though, right? The &lt;tt&gt;existingRoutingInfo&lt;/tt&gt; shared pointer is just empty after the move, so the the conditional will always evaluate to &lt;tt&gt;false&lt;/tt&gt; rendering the code in the &lt;tt&gt;if&lt;/tt&gt; block effectively dead.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1417175">SERVER-49800</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>12.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 24 Jul 2020 18:47:30 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 10 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_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>
                            2 years, 10 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>andrew.morrow@mongodb.com</customfieldvalue>
            <customfieldvalue>blake.oler@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxwp9b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hzhoh3:</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="4256">Sharding 2020-11-16</customfieldvalue>
    <customfieldvalue id="4257">Sharding 2020-11-30</customfieldvalue>
    <customfieldvalue id="4258">Sharding 2020-12-14</customfieldvalue>
    <customfieldvalue id="4259">Sharding 2020-12-28</customfieldvalue>
    <customfieldvalue id="4482">Sharding 2021-01-11</customfieldvalue>
    <customfieldvalue id="4483">Sharding 2021-01-25</customfieldvalue>
    <customfieldvalue id="4485">Sharding 2021-02-22</customfieldvalue>
    <customfieldvalue id="4486">Sharding 2021-03-08</customfieldvalue>
    <customfieldvalue id="4487">Sharding 2021-03-22</customfieldvalue>
    <customfieldvalue id="4497">Sharding 2021-04-05</customfieldvalue>
    <customfieldvalue id="4515">Sharding 2021-04-19</customfieldvalue>
    <customfieldvalue id="4516">Sharding 2021-05-03</customfieldvalue>
    <customfieldvalue id="5427">Sharding EMEA 2021-11-15</customfieldvalue>
    <customfieldvalue id="5428">Sharding EMEA 2021-11-29</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|hxwbin:</customfieldvalue>

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