<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:48:34 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-38302] Committing or aborting prepared transactions may fail to un-pin stable timestamp</title>
                <link>https://jira.mongodb.org/browse/SERVER-38302</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When calculating the stable timestamp, the replication coordinator does not allow it to advance beyond the&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/8e6bb7daa4995/src/mongo/db/repl/replication_coordinator_impl.cpp#L3121-L3125&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;oplog entry timestamp of the oldest uncommitted/aborted prepared transaction&lt;/a&gt;. This timestamp is maintained in the &lt;tt&gt;ServerTransactionMetrics&lt;/tt&gt; service context decoration which is updated through the &lt;tt&gt;TransactionParticipant&lt;/tt&gt;&apos;s&#160;&lt;tt&gt;TransactionMetricsObserver&lt;/tt&gt; object when a transaction &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8e6bb7daa4995bf6c19ff975c5e5425ba5a1920f/src/mongo/db/transaction_participant.cpp#L826-L828&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;prepares&lt;/a&gt;, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8e6bb7daa4995bf6c19ff975c5e5425ba5a1920f/src/mongo/db/transaction_participant.cpp#L1016-L1021&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;commits&lt;/a&gt;, or &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8e6bb7daa4995bf6c19ff975c5e5425ba5a1920f/src/mongo/db/transaction_participant.cpp#L1174-L1194&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;aborts&lt;/a&gt;&#160;a transaction.&lt;/p&gt;

&lt;p&gt;It looks like the metrics are updated after &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8e6bb7daa4995bf6c19ff975c5e5425ba5a1920f/src/mongo/db/transaction_participant.cpp#L960&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the commit oplog entry is written&lt;/a&gt;&#160;in a side transaction, so if the commit point advances to include the commit&apos;s opTime before the transaction metrics are updated, a recalculation of the stable timestamp will be triggered, but the replication coordinator will not know it can advance the stable timestamp to include the commit oplog entry. The next operation to trigger a calculation of the stable timestamp will be able to advance to include the commit, but if nothing triggers a new calculation, anything waiting for a new committed snapshot will hang. This seems possible when aborting a prepared transaction as well.&lt;/p&gt;

&lt;p&gt;A similar problem exists with prepare, because we also &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8e6bb7daa4995bf6c19ff975c5e5425ba5a1920f/src/mongo/db/transaction_participant.cpp#L809&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;commit the prepare oplog entry&lt;/a&gt;&#160;before &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8e6bb7daa4995bf6c19ff975c5e5425ba5a1920f/src/mongo/db/transaction_participant.cpp#L826-L828&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;updating the oldest prepared timestamp&lt;/a&gt;&#160;in the transaction metrics, although this should lead to incorrectly advancing the stable timestamp instead of incorrectly holding it back.&lt;/p&gt;</description>
                <environment></environment>
        <key id="639825">SERVER-38302</key>
            <summary>Committing or aborting prepared transactions may fail to un-pin stable timestamp</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="pavithra.vetriselvan@mongodb.com">Pavithra Vetriselvan</assignee>
                                    <reporter username="jack.mulrow@mongodb.com">Jack Mulrow</reporter>
                        <labels>
                            <label>todo_in_code</label>
                    </labels>
                <created>Wed, 28 Nov 2018 21:36:49 +0000</created>
                <updated>Sun, 29 Oct 2023 22:26:17 +0000</updated>
                            <resolved>Thu, 17 Jan 2019 22:23:36 +0000</resolved>
                                                    <fixVersion>4.1.8</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2117724" author="xgen-internal-githook" created="Wed, 16 Jan 2019 22:42:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;pvselvan&apos;, &apos;email&apos;: &apos;pvselvan@umich.edu&apos;, &apos;name&apos;: &apos;Pavi Vetriselvan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38302&quot; title=&quot;Committing or aborting prepared transactions may fail to un-pin stable timestamp&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38302&quot;&gt;&lt;del&gt;SERVER-38302&lt;/del&gt;&lt;/a&gt; recalculate stable timestamp after adding finishOpTime on prepared txn commit&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/89c3502129303b41b8d35bf5d64eb0a242f061da&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/89c3502129303b41b8d35bf5d64eb0a242f061da&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2113071" author="pavithra.vetriselvan" created="Fri, 11 Jan 2019 22:42:12 +0000"  >&lt;p&gt;The original solution of calling into the MetricsObserver before opObserver causes BF-11787 to occur intermittently. In order to move the stable timestamp, we have make sure the finishOpTime is recorded AND that the oplog entry is written.&lt;/p&gt;

&lt;p&gt;Since the root of problem is that nothing triggers a new calculation of the stable timestamp, I think we should explicitly calculate it every time we update the metrics with a finishOpTime. &lt;/p&gt;

&lt;p&gt;This might be an expensive operation, but since pinning back the stable timestamp is temporary, we can remove this once we are allowed to commit/abort behind the stable timestamp. &lt;/p&gt;</comment>
                            <comment id="2112274" author="xgen-internal-githook" created="Fri, 11 Jan 2019 15:23:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;pvselvan&apos;, &apos;email&apos;: &apos;pvselvan@umich.edu&apos;, &apos;name&apos;: &apos;Pavi Vetriselvan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38302&quot; title=&quot;Committing or aborting prepared transactions may fail to un-pin stable timestamp&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38302&quot;&gt;&lt;del&gt;SERVER-38302&lt;/del&gt;&lt;/a&gt; change TransactionState to TerminationCause&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/17514947cc816df2500aa0e919506586d4d56aa0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/17514947cc816df2500aa0e919506586d4d56aa0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2112254" author="xgen-internal-githook" created="Fri, 11 Jan 2019 15:10:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;pvselvan&apos;, &apos;email&apos;: &apos;pvselvan@umich.edu&apos;, &apos;name&apos;: &apos;Pavi Vetriselvan&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38302&quot; title=&quot;Committing or aborting prepared transactions may fail to un-pin stable timestamp&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38302&quot;&gt;&lt;del&gt;SERVER-38302&lt;/del&gt;&lt;/a&gt; update prepared commit/abort metrics before call to opObserver&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit 011d0d1a5d1517f7e8f6df0ce35412e1bf256afe.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/38985804d5bef88e1962f1aebfced5d80c058369&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/38985804d5bef88e1962f1aebfced5d80c058369&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2108955" author="xgen-internal-githook" created="Tue, 8 Jan 2019 18:32:58 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;pvselvan&apos;, &apos;email&apos;: &apos;pvselvan@umich.edu&apos;, &apos;name&apos;: &apos;Pavi Vetriselvan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38302&quot; title=&quot;Committing or aborting prepared transactions may fail to un-pin stable timestamp&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38302&quot;&gt;&lt;del&gt;SERVER-38302&lt;/del&gt;&lt;/a&gt; update prepared commit/abort metrics before call to opObserver&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/011d0d1a5d1517f7e8f6df0ce35412e1bf256afe&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/011d0d1a5d1517f7e8f6df0ce35412e1bf256afe&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2077345" author="siyuan.zhou@10gen.com" created="Fri, 30 Nov 2018 21:16:38 +0000"  >&lt;p&gt;In both cases of prepare and commit, I think we should call into&#160;MetricsObserver before opObserver.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="678065">SERVER-39199</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="564361">SERVER-35811</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="647364">SERVER-38455</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="732679">SERVER-40534</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="881090">SERVER-42542</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>2.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, 30 Nov 2018 21:16:38 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 4 weeks 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1032</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>
                            5 years, 4 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>62.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>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jack.mulrow@mongodb.com</customfieldvalue>
            <customfieldvalue>pavithra.vetriselvan@mongodb.com</customfieldvalue>
            <customfieldvalue>siyuan.zhou@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hudwev:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hu4033:</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="2607">Repl 2018-12-17</customfieldvalue>
    <customfieldvalue id="2701">Repl 2019-01-14</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|hudio7:</customfieldvalue>

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