<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:41:19 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-35879] Add support for reconstituting transactions in their correct state from the transaction table during startup recovery</title>
                <link>https://jira.mongodb.org/browse/SERVER-35879</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description></description>
                <environment></environment>
        <key id="565213">SERVER-35879</key>
            <summary>Add support for reconstituting transactions in their correct state from the transaction table during startup recovery</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="samy.lanka@mongodb.com">Samyukta Lanka</assignee>
                                    <reporter username="greg.mckeon@mongodb.com">Gregory McKeon</reporter>
                        <labels>
                            <label>prepare_durability</label>
                            <label>todo_in_code</label>
                    </labels>
                <created>Thu, 28 Jun 2018 16:07:16 +0000</created>
                <updated>Sun, 29 Oct 2023 22:30:16 +0000</updated>
                            <resolved>Fri, 14 Dec 2018 16:03:01 +0000</resolved>
                                                    <fixVersion>4.1.7</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="2091025" author="xgen-internal-githook" created="Fri, 14 Dec 2018 16:01:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;lankas&apos;, &apos;email&apos;: &apos;samy.lanka@mongodb.com&apos;, &apos;name&apos;: &apos;Samy Lanka&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35879&quot; title=&quot;Add support for reconstituting transactions in their correct state from the transaction table during startup recovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35879&quot;&gt;&lt;del&gt;SERVER-35879&lt;/del&gt;&lt;/a&gt; Reconstitute prepared transactions at end of startup recovery&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/221c9016b79a60de0b0d86ed2e5d331e2f0bfe7a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/221c9016b79a60de0b0d86ed2e5d331e2f0bfe7a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2089817" author="xgen-internal-githook" created="Thu, 13 Dec 2018 17:04:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;lankas&apos;, &apos;email&apos;: &apos;samy.lanka@mongodb.com&apos;, &apos;name&apos;: &apos;Samy Lanka&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35879&quot; title=&quot;Add support for reconstituting transactions in their correct state from the transaction table during startup recovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35879&quot;&gt;&lt;del&gt;SERVER-35879&lt;/del&gt;&lt;/a&gt; Skip invalidating sessions that have a transaction when a node becomes primary&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d917a363457eadd2086b6ef4abae1ce0892aab98&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d917a363457eadd2086b6ef4abae1ce0892aab98&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2039665" author="xgen-internal-githook" created="Tue, 23 Oct 2018 19:32:18 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Samy Lanka&apos;, &apos;email&apos;: &apos;samy.lanka@mongodb.com&apos;, &apos;username&apos;: &apos;lankas&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35879&quot; title=&quot;Add support for reconstituting transactions in their correct state from the transaction table during startup recovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35879&quot;&gt;&lt;del&gt;SERVER-35879&lt;/del&gt;&lt;/a&gt; Deal with commitTransaction oplog entries during startup recovery&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1fea1df1ee21cac90a2217f219f1ba12244fc4fa&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1fea1df1ee21cac90a2217f219f1ba12244fc4fa&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2028430" author="xgen-internal-githook" created="Tue, 9 Oct 2018 21:03:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Samy Lanka&apos;, &apos;email&apos;: &apos;samy.lanka@mongodb.com&apos;, &apos;username&apos;: &apos;lankas&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35879&quot; title=&quot;Add support for reconstituting transactions in their correct state from the transaction table during startup recovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35879&quot;&gt;&lt;del&gt;SERVER-35879&lt;/del&gt;&lt;/a&gt; Deal with abortTransaction and prepareTransaction oplog entries during startup recovery&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1d6087b0314b0201cddf837e7edcf2703464ff73&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1d6087b0314b0201cddf837e7edcf2703464ff73&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2022556" author="judah.schvimer" created="Wed, 3 Oct 2018 18:00:25 +0000"  >&lt;p&gt;LGTM with 2 edits.&lt;br/&gt;
1) I agree with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=siyuan.zhou&quot; class=&quot;user-hover&quot; rel=&quot;siyuan.zhou&quot;&gt;siyuan.zhou&lt;/a&gt; regarding &lt;tt&gt;abortTransaction&lt;/tt&gt;.&lt;br/&gt;
2) I think we want to compare the &lt;tt&gt;stableTimestamp&lt;/tt&gt; to the &lt;tt&gt;commitTimestamp&lt;/tt&gt; rather than the &quot;commit oplog entry timestamp&quot;.&lt;/p&gt;</comment>
                            <comment id="2021481" author="siyuan.zhou@10gen.com" created="Wed, 3 Oct 2018 00:32:20 +0000"  >&lt;p&gt;LGTM. For abort, I guess you want to add the logic into the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d3c4ed928630e646bfc07af0ecc2201432ab22d7/src/mongo/db/repl/oplog.cpp#L997-L1008&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;abortTransaction&lt;/tt&gt;&#160;command application&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="2021479" author="samy.lanka" created="Wed, 3 Oct 2018 00:22:12 +0000"  >&lt;p&gt;I&apos;m planning on splitting this ticket into a few different commits to simplify the code review process:&lt;/p&gt;

&lt;p&gt;1. Dealing with the abort and prepare oplog entries during startup recovery. Each of these will include writing the oplog entries and modifying config.transactions. My plan is to add separate functions to apply_ops.cpp similar to what was added &lt;a href=&quot;https://github.com/mongodb/mongo/blob/23d7c89e501d221a41f350b0b10a52a4f05bb2e2/src/mongo/db/repl/apply_ops.cpp#L270-L301&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and call them from applyOps like &lt;a href=&quot;https://github.com/mongodb/mongo/blob/23d7c89e501d221a41f350b0b10a52a4f05bb2e2/src/mongo/db/repl/apply_ops.cpp#L390-L404&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. These changes will be tested via unit tests.&lt;/p&gt;

&lt;p&gt;2. Dealing with commit oplog entries. This will involve writing the oplog entries, modifying config.transactions and traversing the oplog for the corresponding prepare oplog entry to apply all the operations in the transaction. One option suggested by &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=siyuan.zhou&quot; class=&quot;user-hover&quot; rel=&quot;siyuan.zhou&quot;&gt;siyuan.zhou&lt;/a&gt; for how to apply all the operations from the transaction is to transform the prepare oplog entry into a normal applyOps entry and use the existing &lt;a href=&quot;https://github.com/mongodb/mongo/blob/23d7c89e501d221a41f350b0b10a52a4f05bb2e2/src/mongo/db/repl/apply_ops.cpp#L380&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;applyOps function&lt;/a&gt;. This will also require getting the stable timestamp from &lt;a href=&quot;https://github.com/mongodb/mongo/blob/23d7c89e501d221a41f350b0b10a52a4f05bb2e2/src/mongo/db/repl/replication_recovery.cpp#L252&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;replication_recovery.cpp&lt;/a&gt; and passing it down to the applier so that we can compare the stable timestamp with the commit oplog entry timestamp to know whether we need to apply all the operations from the transaction or not. These changes will be tested via unit tests and some jstests. &lt;/p&gt;

&lt;p&gt;3. Reconstructing the prepared transactions at the end of recovery. This will involve iterating over all entries in config.transactions and for each transaction in prepare, getting the corresponding oplog entry, checking out the session, applying the operations and then preparing the transaction. These changes will be tested mainly via jstests although I may not be able to unblacklist prepare tests from passthrough suites that involve unclean shutdowns, since those sometimes trigger rollbacks.  &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer&quot;&gt;judah.schvimer&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=siyuan.zhou&quot; class=&quot;user-hover&quot; rel=&quot;siyuan.zhou&quot;&gt;siyuan.zhou&lt;/a&gt; let me know if you have any comments on this. &lt;/p&gt;</comment>
                            <comment id="1998917" author="siyuan.zhou@10gen.com" created="Tue, 11 Sep 2018 02:10:02 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer&quot;&gt;judah.schvimer&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=samy.lanka&quot; class=&quot;user-hover&quot; rel=&quot;samy.lanka&quot;&gt;samy.lanka&lt;/a&gt;, I assume this is for startup recovery. I&apos;m referring to this ticket when blacklisting tests in &lt;tt&gt;replica_sets_kill_secondaries_jscore_passthrough&lt;/tt&gt;. After finishing this ticket, please unblacklist them.&lt;/p&gt;</comment>
                            <comment id="1974192" author="judah.schvimer" created="Mon, 13 Aug 2018 16:13:22 +0000"  >&lt;p&gt;I expect this will use a lot of the same machinery as &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35307&quot; title=&quot;Serially within their own batch, secondaries should put prepared transactions in a prepared state and immediately abort them.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35307&quot;&gt;&lt;del&gt;SERVER-35307&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="552167">SERVER-35307</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="565188">SERVER-35872</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="584988">SERVER-36492</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="881093">SERVER-42545</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>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.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>Mon, 13 Aug 2018 16:13:22 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 8 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-35307'>SERVER-35307</a></s>]]></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, 8 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>greg.mckeon@mongodb.com</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>samy.lanka@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|hu1lsf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htsdfr:</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="2483">Repl 2018-09-10</customfieldvalue>
    <customfieldvalue id="2541">Repl 2018-10-08</customfieldvalue>
    <customfieldvalue id="2542">Repl 2018-10-22</customfieldvalue>
    <customfieldvalue id="2543">Repl 2018-11-05</customfieldvalue>
    <customfieldvalue id="2605">Repl 2018-11-19</customfieldvalue>
    <customfieldvalue id="2606">Repl 2018-12-03</customfieldvalue>
    <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|hu181r:</customfieldvalue>

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