<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:55: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-62432] Ensure safe access to ShardingDDLCoordinator instance state documents</title>
                <link>https://jira.mongodb.org/browse/SERVER-62432</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Instances of ShardingDDLCoordinators maintain an in-memory copy of their state document (&lt;a href=&quot;https://github.com/mongodb/mongo/blob/7a937480d7dec9564fdeb519e98555e315dfa970/src/mongo/db/s/rename_collection_coordinator.h#L94&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;e.g&lt;/a&gt;). The coordinator&apos;s main thread reads and writes it (&lt;a href=&quot;https://github.com/mongodb/mongo/blob/7a937480d7dec9564fdeb519e98555e315dfa970/src/mongo/db/s/rename_collection_coordinator.cpp#L150&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;e.g.&lt;/a&gt;). Also, other threads also read it without proper syncronization (e.g. &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7a937480d7dec9564fdeb519e98555e315dfa970/src/mongo/db/s/rename_collection_coordinator.cpp#L99&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;checkIfOptionsConflict&lt;/a&gt;, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7a937480d7dec9564fdeb519e98555e315dfa970/src/mongo/db/s/rename_collection_coordinator.cpp#L121&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;reportForCurrentOp&lt;/a&gt;). This can lead to data races. This same pattern is repeated on all ShardingDDLCoordinators.&lt;/p&gt;

&lt;p&gt;To solve it we could synchronize access to the in-memory state with a mutex, similarly to what was done on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-54300&quot; title=&quot;Tenant migration donor instance state documents should be protected by a mutex&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-54300&quot;&gt;&lt;del&gt;SERVER-54300&lt;/del&gt;&lt;/a&gt;. In this case, we need to make sure that writing the document to disk is not done with the mutex held (see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-53996&quot; title=&quot;Recipient should not do reads/writes while holding the instance mutex&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-53996&quot;&gt;&lt;del&gt;SERVER-53996&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;</description>
                <environment></environment>
        <key id="1960124">SERVER-62432</key>
            <summary>Ensure safe access to ShardingDDLCoordinator instance state documents</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="enrico.golfieri@mongodb.com">Enrico Golfieri</assignee>
                                    <reporter username="jordi.serra-torrens@mongodb.com">Jordi Serra Torrens</reporter>
                        <labels>
                            <label>sharding-wfbf-day</label>
                    </labels>
                <created>Fri, 7 Jan 2022 16:17:32 +0000</created>
                <updated>Sun, 29 Oct 2023 21:44:24 +0000</updated>
                            <resolved>Thu, 12 May 2022 12:59:40 +0000</resolved>
                                    <version>5.0.0</version>
                    <version>5.2.0</version>
                    <version>5.1.0</version>
                                    <fixVersion>5.0.10</fixVersion>
                    <fixVersion>6.0.0-rc9</fixVersion>
                    <fixVersion>6.1.0-rc0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4589355" author="xgen-internal-githook" created="Thu, 2 Jun 2022 11:03:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Enrico Golfieri&apos;, &apos;email&apos;: &apos;enrico.golfieri@mongodb.com&apos;, &apos;username&apos;: &apos;enricogolfieri&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62432&quot; title=&quot;Ensure safe access to ShardingDDLCoordinator instance state documents&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62432&quot;&gt;&lt;del&gt;SERVER-62432&lt;/del&gt;&lt;/a&gt; Ensure safe access to ShardingDDLCoordinator instance state documents&lt;/p&gt;

&lt;p&gt;(cherry picked from commit c4522f8d57ded742ff66a303fb264f517c06502a)&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/42f0d7d83d2b7c297202c51cbe186dae2be61348&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/42f0d7d83d2b7c297202c51cbe186dae2be61348&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4580890" author="xgen-internal-githook" created="Mon, 30 May 2022 10:14:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Enrico Golfieri&apos;, &apos;email&apos;: &apos;enrico.golfieri@mongodb.com&apos;, &apos;username&apos;: &apos;enricogolfieri&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62432&quot; title=&quot;Ensure safe access to ShardingDDLCoordinator instance state documents&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62432&quot;&gt;&lt;del&gt;SERVER-62432&lt;/del&gt;&lt;/a&gt; Ensure safe access to ShardingDDLCoordinator instance state documents&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/92ec456ea23f15a40882b9c96177300543b5c4ad&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/92ec456ea23f15a40882b9c96177300543b5c4ad&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4537978" author="xgen-internal-githook" created="Tue, 10 May 2022 13:29:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Enrico Golfieri&apos;, &apos;email&apos;: &apos;enrico.golfieri@mongodb.com&apos;, &apos;username&apos;: &apos;enricogolfieri&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62432&quot; title=&quot;Ensure safe access to ShardingDDLCoordinator instance state documents&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62432&quot;&gt;&lt;del&gt;SERVER-62432&lt;/del&gt;&lt;/a&gt; Ensure safe access to ShardingDDLCoordinator instance state documents&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c4522f8d57ded742ff66a303fb264f517c06502a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c4522f8d57ded742ff66a303fb264f517c06502a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4479737" author="max.hirschhorn@10gen.com" created="Wed, 13 Apr 2022 12:04:44 +0000"  >&lt;p&gt;Small note that RefineCollectionShardKeyCoordinator having this same issue came up in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-65500&quot; title=&quot;Unprotected concurrent access to coordinator doc member variable by DDL coordinator implementations&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-65500&quot;&gt;&lt;del&gt;SERVER-65500&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="4424007" author="pierlauro.sciarelli" created="Mon, 21 Mar 2022 15:19:55 +0000"  >&lt;p&gt;The same erroneous pattern is also implemented &lt;a href=&quot;https://github.com/mongodb/mongo/blob/9c3588341bde307f0e65effd50ea6a7558044ae1/src/mongo/db/s/rename_collection_participant_service.h#L130&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;for rename participants&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="4302662" author="JIRAUSER1263826" created="Thu, 20 Jan 2022 13:43:27 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jordi.serra-torrens&quot; class=&quot;user-hover&quot; rel=&quot;jordi.serra-torrens&quot;&gt;jordi.serra-torrens&lt;/a&gt;&#160;can you take a look at this and fix the known cases.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="2045881">SERVER-66439</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2023582">SERVER-65500</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2045881">SERVER-66439</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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23470"><![CDATA[v6.0]]></customfieldvalue>
    <customfieldvalue key="21777"><![CDATA[v5.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>Fri, 7 Jan 2022 17:02:13 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 35 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_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>
                            1 year, 35 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>15.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>cris.insignarescuello@mongodb.com</customfieldvalue>
            <customfieldvalue>enrico.golfieri@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jordi.serra-torrens@mongodb.com</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
            <customfieldvalue>pierlauro.sciarelli@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0g7mf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hzzodw:</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="5683">Sharding EMEA 2022-02-07</customfieldvalue>
    <customfieldvalue id="5749">Sharding EMEA 2022-02-21</customfieldvalue>
    <customfieldvalue id="5818">Sharding EMEA 2022-04-18</customfieldvalue>
    <customfieldvalue id="6073">Sharding EMEA 2022-05-02</customfieldvalue>
    <customfieldvalue id="6074">Sharding EMEA 2022-05-16</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|i0ftrr:</customfieldvalue>

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