<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:42:01 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-57506] Eagerly fail when a timestamped transaction enters a prepareConflictRetry loop</title>
                <link>https://jira.mongodb.org/browse/SERVER-57506</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57476&quot; title=&quot;Operation may block on prepare conflict while holding oplog slot, stalling replication indefinitely&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57476&quot;&gt;&lt;del&gt;SERVER-57476&lt;/del&gt;&lt;/a&gt; demonstrates a case where:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A transaction T1 becomes prepared, preparing some update A&lt;/li&gt;
	&lt;li&gt;Another transaction T2 reserves an oplog slot. This slot has an earlier timestamp than the prepare oplog entry of T1.&lt;/li&gt;
	&lt;li&gt;T1 cannot commit its transaction until it is replicated to a majority of nodes. The oplog hole introduced by T2 prevents this from majority replicating.&lt;/li&gt;
	&lt;li&gt;T2 attempts to read the document that&apos;s currently prepared with A.&lt;br/&gt;
This introduces a stall in the system.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57476&quot; title=&quot;Operation may block on prepare conflict while holding oplog slot, stalling replication indefinitely&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57476&quot;&gt;&lt;del&gt;SERVER-57476&lt;/del&gt;&lt;/a&gt; plans to address the problem by returning a retryable error to the user when a transaction with a commit timestamp actually hits a prepare conflict. This targets the global problem. That fix will have no effect if a system doesn&apos;t have the requisite interleaving illustrated by T1 and T2.&lt;/p&gt;

&lt;p&gt;This ticket is to craft a set of criteria local to a single operation to know when it may lead to the described stall. This is important because it&apos;s difficult for our system to thoroughly generate all combinations of operations that can bring out this interleaving. &lt;/p&gt;

&lt;p&gt;However, there are challenges. It&apos;s not sufficient to simply invariant that &lt;a href=&quot;https://github.com/mongodb/mongo/blob/6d0e2dcb63fba3f23ed9bd0acf07d53111615992/src/mongo/db/storage/wiredtiger/wiredtiger_prepare_conflict.h#L66&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;anything entering a &lt;tt&gt;preparedConflictRetry&lt;/tt&gt; loop&lt;/a&gt; must also not be holding any resources (i.e: have a commit/durable timestamp):&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Entering a prepareConflictRetry is safe on primaries when the operation has exclusive access to a collection.&lt;/li&gt;
	&lt;li&gt;The transaction may be &lt;a href=&quot;https://github.com/mongodb/mongo/blob/6d0e2dcb63fba3f23ed9bd0acf07d53111615992/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h#L142&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ignoring prepare conflicts&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;The system may be in a state (e.g: startup or rollback) where prepared transactions do not currently exist.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="1770879">SERVER-57506</key>
            <summary>Eagerly fail when a timestamped transaction enters a prepareConflictRetry loop</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="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="12300">Won&apos;t Do</resolution>
                                        <assignee username="gregory.noma@mongodb.com">Gregory Noma</assignee>
                                    <reporter username="daniel.gottlieb@mongodb.com">Daniel Gottlieb</reporter>
                        <labels>
                    </labels>
                <created>Mon, 7 Jun 2021 18:13:19 +0000</created>
                <updated>Mon, 23 May 2022 15:22:51 +0000</updated>
                            <resolved>Mon, 23 May 2022 15:22:50 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>14</watches>
                                                                                                                <comments>
                            <comment id="4566451" author="gregory.noma" created="Mon, 23 May 2022 15:22:37 +0000"  >&lt;p&gt;I&apos;m going to close out this ticket. The idea would be to add some sort of debug assertion which could alert us to additional interleavings of operations which may manifest as something similar to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57476&quot; title=&quot;Operation may block on prepare conflict while holding oplog slot, stalling replication indefinitely&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57476&quot;&gt;&lt;del&gt;SERVER-57476&lt;/del&gt;&lt;/a&gt;. However, it is unfortunately quite difficult to craft such an assertion which would still be useful without overreaching and triggering on cases which are known to (theoretically) be safe. Additionally, even if this assertion did catch a new case, it is not clear what we would do with this information aside from poke a hole in the assertion and allow the fix in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57476&quot; title=&quot;Operation may block on prepare conflict while holding oplog slot, stalling replication indefinitely&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57476&quot;&gt;&lt;del&gt;SERVER-57476&lt;/del&gt;&lt;/a&gt; to do its job.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1769596">SERVER-57476</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>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>13.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 24 Mar 2022 15:22:44 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 37 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>gregory.noma@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 37 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>gregory.noma@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzk3c7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr25np:4i</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="4879">Execution Team 2021-06-14</customfieldvalue>
    <customfieldvalue id="4880">Execution Team 2021-06-28</customfieldvalue>
    <customfieldvalue id="4882">Execution Team 2021-07-26</customfieldvalue>
    <customfieldvalue id="5117">Execution Team 2021-08-23</customfieldvalue>
    <customfieldvalue id="5118">Execution Team 2021-09-06</customfieldvalue>
    <customfieldvalue id="5119">Execution Team 2021-09-20</customfieldvalue>
    <customfieldvalue id="5231">Execution Team 2021-10-04</customfieldvalue>
    <customfieldvalue id="5420">Execution Team 2021-11-01</customfieldvalue>
    <customfieldvalue id="5421">Execution Team 2021-11-15</customfieldvalue>
    <customfieldvalue id="5588">Execution Team 2022-02-21</customfieldvalue>
    <customfieldvalue id="5813">Execution Team 2022-04-04</customfieldvalue>
    <customfieldvalue id="5980">Execution Team 2022-05-16</customfieldvalue>
    <customfieldvalue id="5981">Execution Team 2022-05-30</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|hzjplb:</customfieldvalue>

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