<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:54: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-62072] _configsvrReshardCollection may return without having waited for unsetting &quot;reshardingFields&quot; to replicate to majority</title>
                <link>https://jira.mongodb.org/browse/SERVER-62072</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r5.0.5/src/mongo/db/s/config/configsvr_reshard_collection_cmd.cpp#L220-L224&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;The &amp;#95;configsvrReshardCollection command waits on the completion future returned by the ReshardingCoordinator&lt;/a&gt;. This completion future becomes ready after the local replica set transaction to delete the config.reshardingOperations document and unset the &lt;tt&gt;reshardingFields&lt;/tt&gt; from the config.collections entry commits with w:majority. (Note that &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61444&quot; title=&quot;Resharding uses of bumpCollectionVersionAndChangeMetadataInTxn are not idempotent&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61444&quot;&gt;&lt;del&gt;SERVER-61444&lt;/del&gt;&lt;/a&gt; may change it to be w:1 and move when the wait for majority happens.)&lt;/p&gt;

&lt;p&gt;If there is no in&amp;#45;progress ReshardingCoordinator and the desired shard key pattern already matches the current shard key pattern, then &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r5.0.5/src/mongo/db/s/config/configsvr_reshard_collection_cmd.cpp#L175-L181&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the &amp;#95;configsvrReshardCollection command returns without waiting on a completion future&lt;/a&gt;. This read of the config.collections entry to check the current shard key pattern happens with read concern level &quot;local&quot; and may therefore reflect changes which could be rolled back.&lt;/p&gt;

&lt;p&gt;The impact here is low because the &quot;effect&quot; which can be rolled back is only the ReshardingCoordinator&apos;s removal of the &lt;tt&gt;reshardingFields&lt;/tt&gt; from the config.collections entry. It is still guaranteed that &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r5.0.5/src/mongo/db/s/resharding/resharding_coordinator_service.cpp#L1245&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the update to the shard key pattern in the config.collections has already been majority&amp;#45;committed&lt;/a&gt;.&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;repl::ReplClientInfo::forClient(opCtx-&amp;gt;getClient()).setLastOpToSystemLastOpTime(opCtx);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;can be used to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r5.0.5/src/mongo/db/service_entry_point_mongod.cpp#L152-L163&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ensure ServiceEntryPointMongod::Hooks::waitForWriteConcern() will wait for write concern&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1950966">SERVER-62072</key>
            <summary>_configsvrReshardCollection may return without having waited for unsetting &quot;reshardingFields&quot; to replicate to majority</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="brett.nawrocki@mongodb.com">Brett Nawrocki</assignee>
                                    <reporter username="max.hirschhorn@mongodb.com">Max Hirschhorn</reporter>
                        <labels>
                            <label>neweng</label>
                            <label>sharding-nyc-subteam1</label>
                    </labels>
                <created>Wed, 15 Dec 2021 17:13:17 +0000</created>
                <updated>Sun, 29 Oct 2023 21:45:00 +0000</updated>
                            <resolved>Fri, 7 Jan 2022 16:57:27 +0000</resolved>
                                    <version>5.0.0</version>
                    <version>5.1.0</version>
                    <version>5.2.0-rc1</version>
                                    <fixVersion>5.3.0</fixVersion>
                    <fixVersion>5.2.1</fixVersion>
                    <fixVersion>5.0.7</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4346300" author="xgen-internal-githook" created="Wed, 9 Feb 2022 21:02:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Brett Nawrocki&apos;, &apos;email&apos;: &apos;brett.nawrocki@mongodb.com&apos;, &apos;username&apos;: &apos;brettnawrocki&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62072&quot; title=&quot;_configsvrReshardCollection may return without having waited for unsetting &amp;quot;reshardingFields&amp;quot; to replicate to majority&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62072&quot;&gt;&lt;del&gt;SERVER-62072&lt;/del&gt;&lt;/a&gt; Reshard command waits for cleanup to be majority committed&lt;/p&gt;

&lt;p&gt;The _configsvrReshardCollection command waits on the completion future&lt;br/&gt;
returned by the ReshardingCoordinator. This completion future becomes&lt;br/&gt;
ready after the local replica set transaction to delete the&lt;br/&gt;
config.reshardingOperations document and unset the reshardingFields from&lt;br/&gt;
the config.collections entry commits with w:majority. However, if there&lt;br/&gt;
is a step down and the new primary has already replicated these deletes,&lt;br/&gt;
the command will return despite those deletes not necessarily being&lt;br/&gt;
majority committed. If a rollback occurs, the command could then return&lt;br/&gt;
without fully cleaning up the resharding operation by leaving the&lt;br/&gt;
reshardingFields in the config.collections entry. Now,&lt;br/&gt;
_configsvrReshardCollection will wait on the last system op time to&lt;br/&gt;
ensure the cleanup has been majority committed.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 997bade5afb420cdf369d7fc66d7cb9498230635)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a3675d1fd04bd8985f88ecf128ed336e59c53e6c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a3675d1fd04bd8985f88ecf128ed336e59c53e6c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4346202" author="xgen-internal-githook" created="Wed, 9 Feb 2022 20:36:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Brett Nawrocki&apos;, &apos;email&apos;: &apos;brett.nawrocki@mongodb.com&apos;, &apos;username&apos;: &apos;brettnawrocki&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62072&quot; title=&quot;_configsvrReshardCollection may return without having waited for unsetting &amp;quot;reshardingFields&amp;quot; to replicate to majority&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62072&quot;&gt;&lt;del&gt;SERVER-62072&lt;/del&gt;&lt;/a&gt; Reshard command waits for cleanup to be majority committed&lt;/p&gt;

&lt;p&gt;The _configsvrReshardCollection command waits on the completion future&lt;br/&gt;
returned by the ReshardingCoordinator. This completion future becomes&lt;br/&gt;
ready after the local replica set transaction to delete the&lt;br/&gt;
config.reshardingOperations document and unset the reshardingFields from&lt;br/&gt;
the config.collections entry commits with w:majority. However, if there&lt;br/&gt;
is a step down and the new primary has already replicated these deletes,&lt;br/&gt;
the command will return despite those deletes not necessarily being&lt;br/&gt;
majority committed. If a rollback occurs, the command could then return&lt;br/&gt;
without fully cleaning up the resharding operation by leaving the&lt;br/&gt;
reshardingFields in the config.collections entry. Now,&lt;br/&gt;
_configsvrReshardCollection will wait on the last system op time to&lt;br/&gt;
ensure the cleanup has been majority committed.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 997bade5afb420cdf369d7fc66d7cb9498230635)&lt;br/&gt;
Branch: v5.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a9c71b98ad671afc7562c26f1bba5cc7450b13ba&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a9c71b98ad671afc7562c26f1bba5cc7450b13ba&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4280698" author="xgen-internal-githook" created="Fri, 7 Jan 2022 16:41:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Brett Nawrocki&apos;, &apos;email&apos;: &apos;brett.nawrocki@mongodb.com&apos;, &apos;username&apos;: &apos;brettnawrocki&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62072&quot; title=&quot;_configsvrReshardCollection may return without having waited for unsetting &amp;quot;reshardingFields&amp;quot; to replicate to majority&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62072&quot;&gt;&lt;del&gt;SERVER-62072&lt;/del&gt;&lt;/a&gt; Reshard command waits for cleanup to be majority committed&lt;/p&gt;

&lt;p&gt;The _configsvrReshardCollection command waits on the completion future&lt;br/&gt;
returned by the ReshardingCoordinator. This completion future becomes&lt;br/&gt;
ready after the local replica set transaction to delete the&lt;br/&gt;
config.reshardingOperations document and unset the reshardingFields from&lt;br/&gt;
the config.collections entry commits with w:majority. However, if there&lt;br/&gt;
is a step down and the new primary has already replicated these deletes,&lt;br/&gt;
the command will return despite those deletes not necessarily being&lt;br/&gt;
majority committed. If a rollback occurs, the command could then return&lt;br/&gt;
without fully cleaning up the resharding operation by leaving the&lt;br/&gt;
reshardingFields in the config.collections entry. Now,&lt;br/&gt;
_configsvrReshardCollection will wait on the last system op time to&lt;br/&gt;
ensure the cleanup has been majority committed.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/997bade5afb420cdf369d7fc66d7cb9498230635&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/997bade5afb420cdf369d7fc66d7cb9498230635&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1924136">SERVER-61444</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>3.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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="22676"><![CDATA[v5.2]]></customfieldvalue>
    <customfieldvalue key="22495"><![CDATA[v5.1]]></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>Tue, 21 Dec 2021 18:45:52 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years 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>
                            2 years 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>brett.nawrocki@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0encv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hraf3z:</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="5228">Sharding 2021-12-27</customfieldvalue>
    <customfieldvalue id="5726">Sharding 2022-01-10</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</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|i0e9i7:</customfieldvalue>

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