<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:13:23 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-47130] Reduce w:majority commits from 4 to 2 in 2 PC</title>
                <link>https://jira.mongodb.org/browse/SERVER-47130</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;As of 4.2 our 2 PC implementation requires 4x majority commits. This is usually the dominating portion of commit latency.&lt;/p&gt;

&lt;p&gt;(Below persist = w:majority commit)&lt;/p&gt;

&lt;p&gt;1. transaction coordinator shard persists information about what other participants are part of this transaction.&lt;br/&gt;
2. all participants persist the prepare phase of their part of the transaction&lt;br/&gt;
3. transaction coordinator persists the commit or abort decision&lt;br/&gt;
4. all participants persist commit or abort as directed by the coordinator&lt;/p&gt;

&lt;p&gt;Step 1 can be avoided by folding it into step 2:&lt;/p&gt;

&lt;p&gt;As part of the prepare message, coordinator embeds the list of participants and the identity of the coordinator. (The coordinator is one of the participants.) Participants persist this information together with persisting the prepare state of the transaction itself.&lt;/p&gt;

&lt;p&gt;Recovery in case of failure: &lt;/p&gt;

&lt;p&gt;2a) Remember that the original coordinator is itself a replica set / shard. Assuming that the original coordinator had succeeded in persisting its prepare message, and succeeds in electing a new primary and connecting to the rest of the cluster, then the new primary can simply resume the role of the coordinator and resend the prepare message to all participants. (In this scenario the coordinator can continue acting as the coordinator until the end of the 2PC protocol.)&lt;/p&gt;

&lt;p&gt;2b) If the original coordinator fails before it had succeeded in persisting its own prepare message, it will have lost state that is necessary to continue as coordinator. (In fact, it doesn&apos;t even know it is a participant in this 2PC transaction!) Since at least 1 participant has failed the prepare phase and lost transaction state, the only possible outcome is that the transaction must be aborted. The other participants can learn about this by: after a timeout, poll (with readConcern=majority) all other participants for their state and if at least one other participant has lost the transaction, they must abort too. (It&apos;s also possible that a participant enters this state and learns that at least one participant has committed the transaction. In this case it can also commit its transaction.)&lt;/p&gt;

&lt;p&gt;2c) If none of the participants have received or persisted the prepare message, then the transaction will eventually time out on each of them.&lt;/p&gt;

&lt;p&gt;In step 3 the coordinator will first persist its abort or commit decision for itself. (Same as current behavior.) As per &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37364&quot; title=&quot;Coordinator should return the decision to the client as soon as the decision is durable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37364&quot;&gt;&lt;del&gt;SERVER-37364&lt;/del&gt;&lt;/a&gt; it can now return the result of the transaction to the client. &lt;/p&gt;

&lt;p&gt;In step 4 the coordinator sends abort/commit to all participants. In case of any failure, the coordinator can just keep resending the message until all participants have acknowledged it.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1292129">SERVER-47130</key>
            <summary>Reduce w:majority commits from 4 to 2 in 2 PC</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-cluster-scalability">Backlog - Cluster Scalability</assignee>
                                    <reporter username="henrik.ingo@mongodb.com">Henrik Ingo</reporter>
                        <labels>
                            <label>ShardedTxn:FutureOptimizations</label>
                    </labels>
                <created>Thu, 26 Mar 2020 13:21:14 +0000</created>
                <updated>Tue, 12 Dec 2023 15:49:09 +0000</updated>
                                                                            <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>20</watches>
                                                                                                                <comments>
                            <comment id="5391056" author="schwerin" created="Mon, 1 May 2023 15:21:56 +0000"  >&lt;p&gt;Note that we stepped back from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37364&quot; title=&quot;Coordinator should return the decision to the client as soon as the decision is durable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37364&quot;&gt;&lt;del&gt;SERVER-37364&lt;/del&gt;&lt;/a&gt; in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-63971&quot; title=&quot;Change server parameter to default to read-your-writes behavior after 2PC transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-63971&quot;&gt;&lt;del&gt;SERVER-63971&lt;/del&gt;&lt;/a&gt;, because users preferred to get external read-your-writes behavior. Finding a read-your-writes solution here that still cuts out majority writes would be interesting.&lt;/p&gt;</comment>
                            <comment id="3004333" author="jason.carey" created="Fri, 27 Mar 2020 15:19:31 +0000"  >&lt;p&gt;This is a great suggestion, and we&apos;re interested in pursuing something like this in the future.&lt;/p&gt;

&lt;p&gt;At the current moment, we&apos;re de-emphasizing work that provides constant factor improvements in performance in sharding, to focus on correctness and feature gaps.  Given that this change would only affect users using distributed transactions with performance constraints (and wouldn&apos;t get us all the way to letting users use distributed transactions sanely on their hot path), we&apos;ll have to revisit this in the future.&lt;/p&gt;

&lt;p&gt;Thanks very much for the write up&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1989735">SERVER-63971</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="611093">SERVER-37364</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26583"><![CDATA[Cluster Scalability]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 27 Mar 2020 15:19:31 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        40 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>dbeng-pm-bot</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            40 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-cluster-scalability</customfieldvalue>
            <customfieldvalue>henrik.ingo@mongodb.com</customfieldvalue>
            <customfieldvalue>mira.carey@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxbihr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hwz7j3:</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_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|hxb4r3:</customfieldvalue>

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