<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:04:21 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-43875] Initial sync may crash due to missing oplog entries of running transactions</title>
                <link>https://jira.mongodb.org/browse/SERVER-43875</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Initial sync fetches the oldest active transaction timestamp before the top of oplog. In the following case, it would miss the necessary oplog entries needed by oplog application.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Initial sync fetches the oldest active transaction timestamp, seeing no running transaction.&lt;/li&gt;
	&lt;li&gt;A transaction starts and gets prepared, writing the prepare command  &lt;span class=&quot;error&quot;&gt;&amp;#91;P&amp;#93;&lt;/span&gt; into the oplog.&lt;/li&gt;
	&lt;li&gt;The transaction commits, writing the commit command &lt;span class=&quot;error&quot;&gt;&amp;#91;C&amp;#93;&lt;/span&gt; into the oplog.&lt;/li&gt;
	&lt;li&gt;Initial sync fetches the top of oplog &lt;span class=&quot;error&quot;&gt;&amp;#91;C&amp;#93;&lt;/span&gt;.&lt;/li&gt;
	&lt;li&gt;Initial sync starts to apply operations from &lt;span class=&quot;error&quot;&gt;&amp;#91;C&amp;#93;&lt;/span&gt; since there was no running transaction and fails to applies it since the needed &lt;span class=&quot;error&quot;&gt;&amp;#91;P&amp;#93;&lt;/span&gt; is missing.&lt;/li&gt;
&lt;/ol&gt;

</description>
                <environment></environment>
        <key id="963408">SERVER-43875</key>
            <summary>Initial sync may crash due to missing oplog entries of running transactions</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="samy.lanka@mongodb.com">Samyukta Lanka</assignee>
                                    <reporter username="siyuan.zhou@mongodb.com">Siyuan Zhou</reporter>
                        <labels>
                            <label>KP42</label>
                    </labels>
                <created>Mon, 7 Oct 2019 21:54:12 +0000</created>
                <updated>Sun, 29 Oct 2023 22:16:21 +0000</updated>
                            <resolved>Tue, 5 Nov 2019 19:35:04 +0000</resolved>
                                    <version>4.2.0</version>
                                    <fixVersion>4.3.1</fixVersion>
                    <fixVersion>4.2.3</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="2607336" author="xgen-internal-githook" created="Fri, 13 Dec 2019 18:20:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Samyukta 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-43875&quot; title=&quot;Initial sync may crash due to missing oplog entries of running transactions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43875&quot;&gt;&lt;del&gt;SERVER-43875&lt;/del&gt;&lt;/a&gt; Start initial sync oplog fetching from an earlier point to fetch all oplog entries associated with active transactions&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 853bdc4b34d9c3505e2af1f443ad7a99a619adea)&lt;br/&gt;
(cherry picked from commit 16757ee6065f0a1ded211ebfe33c6cd593f34b27)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b7186ebc02a6997e4a3070da9616de81ca58e21d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b7186ebc02a6997e4a3070da9616de81ca58e21d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2519231" author="xgen-internal-githook" created="Wed, 6 Nov 2019 00:59:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Benety Goh&apos;, &apos;username&apos;: &apos;benety&apos;, &apos;email&apos;: &apos;benety@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43875&quot; title=&quot;Initial sync may crash due to missing oplog entries of running transactions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43875&quot;&gt;&lt;del&gt;SERVER-43875&lt;/del&gt;&lt;/a&gt; fix test&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/16757ee6065f0a1ded211ebfe33c6cd593f34b27&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/16757ee6065f0a1ded211ebfe33c6cd593f34b27&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2518676" author="xgen-internal-githook" created="Tue, 5 Nov 2019 19:32:53 +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;Samyukta Lanka&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43875&quot; title=&quot;Initial sync may crash due to missing oplog entries of running transactions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43875&quot;&gt;&lt;del&gt;SERVER-43875&lt;/del&gt;&lt;/a&gt; Start initial sync oplog fetching from an earlier point to fetch all oplog entries associated with active transactions&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/853bdc4b34d9c3505e2af1f443ad7a99a619adea&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/853bdc4b34d9c3505e2af1f443ad7a99a619adea&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2487683" author="siyuan.zhou@10gen.com" created="Thu, 17 Oct 2019 21:18:31 +0000"  >&lt;p&gt;I like &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;&apos;s proposal. The only concern is that if the transaction command corresponding to the real OAT is an oplog hole when getting T1 and OAT, T1 may be greater than the real OAT even if an empty OAT is returned. To fix it, we can wait for all previous writes to be visible before reading OAT by adding &lt;tt&gt;afterClusterTime(Timestamp(0, 1)&lt;/tt&gt; to the OAT query in the same way as in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42910&quot; title=&quot;Oplog query with higher timestamp but lower term than the sync source shouldn&amp;#39;t time out due to afterClusterTime&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42910&quot;&gt;&lt;del&gt;SERVER-42910&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="2485534" author="judah.schvimer" created="Wed, 16 Oct 2019 19:21:20 +0000"  >&lt;p&gt;We should also amend the architecture guide post &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43386&quot; title=&quot;Update initial sync section of the architecture guide&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43386&quot;&gt;&lt;del&gt;SERVER-43386&lt;/del&gt;&lt;/a&gt; with whatever we change here.&lt;/p&gt;</comment>
                            <comment id="2482578" author="judah.schvimer" created="Tue, 15 Oct 2019 14:09:40 +0000"  >&lt;p&gt;Instead or in addition to a targeted test for this, it may make sense to just fold &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44014&quot; title=&quot;Add missing synchronization points to initial sync fuzzer&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44014&quot;&gt;&lt;del&gt;SERVER-44014&lt;/del&gt;&lt;/a&gt; into this work.&lt;/p&gt;</comment>
                            <comment id="2470214" author="judah.schvimer" created="Mon, 7 Oct 2019 23:43:35 +0000"  >&lt;p&gt;Readers should note this results in a node crash during initial sync, not data corruption or even a crash outside of initial sync, so the concern here is actually relatively low.&lt;/p&gt;

&lt;p&gt;I think we can fix this by fetching the top of the oplog (T1), then fetching the oldest active transaction timestamp (OAT), and then fetching the top of the oplog again (T2). We use T2 for when to begin applying, and start fetching from min(T1,OAT). This would ensure that we start fetching before any transactions could come in, even if there is no OAT.&lt;/p&gt;

&lt;p&gt;Since this problem only exists when there are no active transactions when OAT is fetched, we could more surgically fix this by starting fetching from (OAT == null ? T1, OAT).&lt;/p&gt;</comment>
                            <comment id="2470209" author="judah.schvimer" created="Mon, 7 Oct 2019 23:37:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn&quot;&gt;max.hirschhorn&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vlad.rachev&quot; class=&quot;user-hover&quot; rel=&quot;vlad.rachev&quot;&gt;vlad.rachev&lt;/a&gt;, &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; pointed out that it&apos;s strange the initial sync fuzzer hasn&apos;t caught this. Any ideas why and what we can do to surface it?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10220">
                    <name>Tested</name>
                                            <outwardlinks description="tested by">
                                        <issuelink>
            <issuekey id="970230">SERVER-44014</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>8.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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16775"><![CDATA[v4.2]]></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, 7 Oct 2019 23:37:01 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 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[]]></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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></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>
                            4 years, 8 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9.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>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|hvwfzz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvkz27:</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="3303">Repl 2019-11-04</customfieldvalue>
    <customfieldvalue id="3304">Repl 2019-11-18</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|hvw29b:</customfieldvalue>

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