<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:57:26 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-41333] Initial Sync and Shutdown write to the minValid document at the lastApplied</title>
                <link>https://jira.mongodb.org/browse/SERVER-41333</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;During shutdown and initial sync, we update the minValid document using the lastApplied as the timestamp of the write. Since the lastApplied has already been updated before we write to the minValid document, any reader can read at the lastApplied before the write commits.&lt;/p&gt;

&lt;p&gt;This causes us to hit at WT invariant: commitTimestamp &amp;gt; latest active read timestamp (Note, the commitTimestamp is referring to the timestamp at which the write to the minValid document commits).&lt;/p&gt;

&lt;p&gt;Initial Sync: We get the lastApplied from the repl coordinator &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0855ca379139f59a73276c0d2b24e9c47147b897/src/mongo/db/repl/replication_consistency_markers_impl.cpp#L147&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and update the minValid &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0855ca379139f59a73276c0d2b24e9c47147b897/src/mongo/db/repl/replication_consistency_markers_impl.cpp#L165&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; using the lastApplied.&lt;/p&gt;

&lt;p&gt;Shutdown: We get the lastApplied from the repl coordinator and update the minValid &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0855ca379139f59a73276c0d2b24e9c47147b897/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp#L381-L383&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This race doesn&apos;t seem to affect steady state replication as frequently. This is because sync tail &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0855ca379139f59a73276c0d2b24e9c47147b897/src/mongo/db/repl/sync_tail.cpp#L814-L817&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ensures&lt;/a&gt; that the lastApplied does not change at the start of the batch and bgsync &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0855ca379139f59a73276c0d2b24e9c47147b897/src/mongo/db/repl/bgsync.cpp#L394-L397&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;does not set&lt;/a&gt; the lastApplied unless it is unset.&lt;/p&gt;

&lt;p&gt;UPDATE: The WT invariant was disabled. Enabling the WT invariant is blocked on this ticket.&lt;/p&gt;</description>
                <environment></environment>
        <key id="778647">SERVER-41333</key>
            <summary>Initial Sync and Shutdown write to the minValid document at the lastApplied</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="suganthi.mani@mongodb.com">Suganthi Mani</assignee>
                                    <reporter username="pavithra.vetriselvan@mongodb.com">Pavithra Vetriselvan</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 May 2019 14:43:18 +0000</created>
                <updated>Sun, 29 Oct 2023 22:20:41 +0000</updated>
                            <resolved>Thu, 16 Jan 2020 22:37:55 +0000</resolved>
                                                    <fixVersion>4.3.3</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="2736036" author="xgen-internal-githook" created="Thu, 16 Jan 2020 21:57:52 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;smani87&apos;, &apos;name&apos;: &apos;Suganthi Mani&apos;, &apos;email&apos;: &apos;suganthi.mani@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41333&quot; title=&quot;Initial Sync and Shutdown write to the minValid document at the lastApplied&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41333&quot;&gt;&lt;del&gt;SERVER-41333&lt;/del&gt;&lt;/a&gt; Make safer for initial Sync and Shutdown to write the minValid document at the lastApplied.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e34948fe7a90aa328237b54eddb75584a38ff52c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e34948fe7a90aa328237b54eddb75584a38ff52c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2263560" author="tess.avitabile" created="Wed, 29 May 2019 13:39:29 +0000"  >&lt;p&gt;That sounds great, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alexander.gorrod&quot; class=&quot;user-hover&quot; rel=&quot;alexander.gorrod&quot;&gt;alexander.gorrod&lt;/a&gt;. We can see how hard it would be to avoid this issue for the minValid document.&lt;/p&gt;</comment>
                            <comment id="2262792" author="alexander.gorrod" created="Tue, 28 May 2019 22:30:19 +0000"  >&lt;p&gt;Thanks for the update &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt; - I&apos;ve adjusted the fix version for &lt;a href=&quot;https://jira.mongodb.org/browse/WT-4780&quot; title=&quot;Enable assertion that commit timestamp is newer than all readers&quot; class=&quot;issue-link&quot; data-issue-key=&quot;WT-4780&quot;&gt;&lt;del&gt;WT-4780&lt;/del&gt;&lt;/a&gt;. Forcing the conversation this far was the point of keeping the fix version at 4.2. If it would be helpful we can add a flag to the API so known violators of the assertion can be marked as such - let&apos;s make that decision when we come back to re-enabling the assertion after the release.&lt;/p&gt;</comment>
                            <comment id="2262015" author="tess.avitabile" created="Tue, 28 May 2019 15:51:36 +0000"  >&lt;p&gt;We may also hit the WT invariant when we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3219b9784947b4f1bb7f07d56a42610e74eba1cd/src/mongo/db/repl/bgsync.cpp#L396-L397&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;set appliedThrough&lt;/a&gt; upon transitioning to secondary and beginning batch application.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="767554">WT-4780</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.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>Tue, 28 May 2019 15:51:36 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 3 weeks, 6 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, 3 weeks, 6 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>alexander.gorrod@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>pavithra.vetriselvan@mongodb.com</customfieldvalue>
            <customfieldvalue>suganthi.mani@mongodb.com</customfieldvalue>
            <customfieldvalue>tess.avitabile@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hv1b87:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvz0lb:</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="3304">Repl 2019-11-18</customfieldvalue>
    <customfieldvalue id="3401">Execution Team 2019-12-16</customfieldvalue>
    <customfieldvalue id="3436">Repl 2019-12-02</customfieldvalue>
    <customfieldvalue id="3437">Repl 2019-12-16</customfieldvalue>
    <customfieldvalue id="3517">Execution Team 2020-01-13</customfieldvalue>
    <customfieldvalue id="3518">Execution Team 2020-01-27</customfieldvalue>
    <customfieldvalue id="3521">Execution Team 2019-12-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|hv0xhj:</customfieldvalue>

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