<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:14:04 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-7275] node can&apos;t roll back if behind minValid</title>
                <link>https://jira.mongodb.org/browse/SERVER-7275</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Consider a replica set with three members at this state of oplogs:&lt;/p&gt;

&lt;p&gt;S1: 1 2 3 4 5 6 7 8 9 (primary)&lt;br/&gt;
S2: 1 &lt;br/&gt;
S3: 1 2 3 4 5&lt;/p&gt;

&lt;p&gt;now suppose S2 starts applying the batch 2..9.  It early commits &lt;/p&gt;
{2,4,6,8} ops. It then crashes.&lt;br/&gt;
&lt;br/&gt;
after crashing, the oplog for S2 is unchanged, but writes have occurred to the datafiles for opids {2,4,6,8}
&lt;p&gt;.&lt;/p&gt;

&lt;p&gt;On restart, S2 would recover ok (if it&apos;s idempotent) if S1 is up. However, suppose S1 goes down first (perhaps permanently).  Now S2 and S3 are the remaining set members on S2&apos;s restart.  S3 has the latest data.  After recovery we have:&lt;/p&gt;

&lt;p&gt;S1: down&lt;br/&gt;
S2: 1 2 3 4 5 (+&lt;/p&gt;
{6,8} applied but not in oplog)&lt;br/&gt;
S3: 1 2 3 4 5&lt;br/&gt;
&lt;br/&gt;
*However S2 has also written ops {6,8}
&lt;p&gt; and they are never rolled back.&lt;/p&gt;</description>
                <environment></environment>
        <key id="52421">SERVER-7275</key>
            <summary>node can&apos;t roll back if behind minValid</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="3">Duplicate</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="dwight@mongodb.com">Dwight Merriman</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Oct 2012 16:03:25 +0000</created>
                <updated>Tue, 6 Dec 2022 05:28:51 +0000</updated>
                            <resolved>Thu, 8 Sep 2016 18:47:00 +0000</resolved>
                                                                    <component>Replication</component>
                                        <votes>2</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="1379862" author="milkie" created="Thu, 8 Sep 2016 18:47:00 +0000"  >&lt;p&gt;The situation described here is fixed by the work in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-7200&quot; title=&quot;use oplog as op buffer on secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-7200&quot;&gt;&lt;del&gt;SERVER-7200&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1242811" author="scotthernandez" created="Thu, 21 Apr 2016 18:02:57 +0000"  >&lt;p&gt;Since it is now possible that the oplog has been written locally, it might be possible to finish applying to get consistent and then to do the rollback after. This would only be possible if the oplog entries were recorded and are available on restart &amp;#8211; which is now possible since we write the local oplog entries and apply them concurrently. This would be the same behavior as the oplog as a buffer, but that change promises that the oplog will be there, instead of just being possibly there depending on execution and journaling order.&lt;/p&gt;</comment>
                            <comment id="834818" author="milkie" created="Mon, 23 Feb 2015 15:48:03 +0000"  >&lt;p&gt;Actually in the scenario above, S2 would go down, since it would attempt rollback but its minValid was not pointing at the end of its oplog.&lt;br/&gt;
The oplog-as-buffer project will solve this issue, by logging ops in the oplog prior to applying them.&lt;/p&gt;</comment>
                            <comment id="171921" author="dwight_10gen" created="Fri, 5 Oct 2012 16:09:44 +0000"  >&lt;p&gt;Three possible solutions:&lt;br/&gt;
1) Never early commit batches. That is, roll them back (remapprivateview) and then retry with a smaller batch size.&lt;br/&gt;
2a) Write to the oplog at the beginning of the batch instead of the end, marking the ops as not yet completed.  Note that other set members should not pull those items until they are really done (barring some proof that that is ok, which i believe is nontrivial). On an early commit flag in the oplog which ones are already done and which are not.  On restart, finish the ops there which are not yet applied before coming up and listening.&lt;br/&gt;
2b) On an early commit write the batch of ops to local.rs.batchinprogress.  note there which ones are already executed.  on restart/recovery finish the batchinprogress items before starting up.  at the end of that job empty batchinpgrogress collection and write the ops to the oplog as normal.&lt;/p&gt;

&lt;p&gt;2b has an advantage over 2a in that it doesn&apos;t change the oplog format. Thus it is backward compatible and in addition won&apos;t mess up anyone who queries the oplog themselves for custom purposes.  It&apos;s kind of like a journal for the current batch.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="51775">SERVER-7200</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="281298">SERVER-23841</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25128"><![CDATA[Replication]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 23 Feb 2015 15:48:03 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 22 weeks, 6 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-7200'>SERVER-7200</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-617</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 22 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></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>backlog-server-repl</customfieldvalue>
            <customfieldvalue>dwight@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnm53:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrclr3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4569</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|hs72pj:</customfieldvalue>

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