<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:50:02 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>[DOCS-5289] How is 2-phase commit done to update config servers?</title>
                <link>https://jira.mongodb.org/browse/DOCS-5289</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;The manual claims that 2-phase commit is used for changes to config servers. A property that 2-phase commit provides is that changes are not visible on any of the servers until all servers have agreed to commit. From reading source in src/mongo/s and src/mongo/s/catalog I don&apos;t see how that is provided.&lt;/p&gt;

&lt;p&gt;Assuming I am correct, can the manual be updated to explain the behavior that is provided?&lt;/p&gt;

&lt;p&gt;What I do see is this pattern for updates which runs in two phases but isn&apos;t 2-phase commit:&lt;br/&gt;
1) ping all config servers to confirm they are running&lt;br/&gt;
2) send write to all config servers&lt;br/&gt;
3) collect responses from writes. If all fail, then report that (which is OK). If all succeed then report OK. Else report inconsistent write because write was done to some but not all config servers.&lt;/p&gt;

&lt;p&gt;Two questions:&lt;br/&gt;
1) Is there code to cleanup from inconsistent write? Cleanup code won&apos;t avoid the race from inconsistent reads, but will shrink the window.&lt;/p&gt;

&lt;p&gt;2) What is done to avoid inconsistent read after inconsistent write? If this were 2-phase commit then inconsistent read (read after inconsistent write) wouldn&apos;t be possible.&lt;/p&gt;

&lt;p&gt;Code I read to understand this includes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;CatalogManagerLegacy::writeConfigServerDirect&lt;/li&gt;
	&lt;li&gt;ConfigCoordinator::executeBatch&lt;/li&gt;
	&lt;li&gt;SSVRequest::combineResponses&lt;/li&gt;
	&lt;li&gt;DBClientMultiCommand::sendAll&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="200370">DOCS-5289</key>
            <summary>How is 2-phase commit done to update config servers?</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="9">Done</resolution>
                                        <assignee username="kay.kim@mongodb.com">Kay Kim</assignee>
                                    <reporter username="mdcallag">Mark Callaghan</reporter>
                        <labels>
                    </labels>
                <created>Sun, 26 Apr 2015 16:37:07 +0000</created>
                <updated>Wed, 24 Feb 2016 20:22:25 +0000</updated>
                            <resolved>Mon, 4 May 2015 21:59:41 +0000</resolved>
                                                                        <due>Fri, 15 May 2015 00:00:00 +0000</due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="904530" author="xgen-internal-githook" created="Mon, 4 May 2015 18:53:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;kay-kim&apos;, u&apos;name&apos;: u&apos;kay&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-5289&quot; title=&quot;How is 2-phase commit done to update config servers?&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-5289&quot;&gt;&lt;del&gt;DOCS-5289&lt;/del&gt;&lt;/a&gt; fix config server write descriptions&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/52905ddedff53675fc140d4259c66b7db2a92e68&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/52905ddedff53675fc140d4259c66b7db2a92e68&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="904529" author="xgen-internal-githook" created="Mon, 4 May 2015 18:53:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;kay-kim&apos;, u&apos;name&apos;: u&apos;kay&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-5289&quot; title=&quot;How is 2-phase commit done to update config servers?&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-5289&quot;&gt;&lt;del&gt;DOCS-5289&lt;/del&gt;&lt;/a&gt; fix config server write descriptions&lt;br/&gt;
Branch: v2.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/e00c5a854a853fd6c41246a055ca6c97fa10376b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/e00c5a854a853fd6c41246a055ca6c97fa10376b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="904528" author="xgen-internal-githook" created="Mon, 4 May 2015 18:52:59 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;kay-kim&apos;, u&apos;name&apos;: u&apos;kay&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-5289&quot; title=&quot;How is 2-phase commit done to update config servers?&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-5289&quot;&gt;&lt;del&gt;DOCS-5289&lt;/del&gt;&lt;/a&gt; fix config server write descriptions&lt;br/&gt;
Branch: v2.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/4c4427c30bf5368110b5d006bd597feceee6dcfe&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/4c4427c30bf5368110b5d006bd597feceee6dcfe&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="903627" author="kay.kim@10gen.com" created="Fri, 1 May 2015 21:44:46 +0000"  >&lt;p&gt;Hi Mark &amp;#8211; Thanks so much for filing this ticket!  Definitely need to update the docs.&lt;/p&gt;</comment>
                            <comment id="898276" author="mdcallag" created="Sun, 26 Apr 2015 16:41:15 +0000"  >&lt;p&gt;Claim from manual is at &lt;a href=&quot;http://docs.mongodb.org/manual/core/sharded-cluster-config-servers/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/core/sharded-cluster-config-servers/&lt;/a&gt;&lt;br/&gt;
&quot;Config servers use a two-phase commit to ensure immediate consistency and reliability.&quot;&lt;/p&gt;

&lt;p&gt;Also spoke about this claim in a mongo-users group discussion. Other operations also write to the config servers, like replacing a shard server.&lt;/p&gt;

&lt;p&gt;&quot;Read and Write Operations on Config Servers&lt;br/&gt;
MongoDB only writes data to the config server in the following cases:&lt;br/&gt;
To create splits in existing chunks. For more information, see chunk splitting.&lt;br/&gt;
To migrate a chunk between shards. For more information, see chunk migration.&quot;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10855" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Actual Time</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 1 May 2015 21:44:46 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 41 weeks, 2 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>jess.mokrzecki@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 41 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kay.kim@mongodb.com</customfieldvalue>
            <customfieldvalue>mdcallag</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrqdnr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs8s1j:</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="487">Docs Current Sprint (487)</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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hryw2n:</customfieldvalue>

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