<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:41:30 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-16570] writeConcerns could be erroneously satisfied after a rollback occurs</title>
                <link>https://jira.mongodb.org/browse/SERVER-16570</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;After a rollback, a node&apos;s replication progress could be behind where other nodes believe it to be, because the writeConcern code does not have support for replication progress being undone. As a result of this, getLastError for ops that occurred between the point of diversion and the latestOp for the rolled-back node could be satisfied with one too few nodes.&lt;/p&gt;

&lt;p&gt;No test has been written for this case yet. But I believe one could be written that is a copy of replsets/rollback2.js where each node is replaced with a pair of nodes, and one of the to-be-rolled-back nodes does not apply operations it has copied from the PRIMARY (failpoint: rsSyncApplyStop), once they have been isolated. This node will have the replication progress of the to-be-rolled-back PRIMARY, but will not have the ops in its own oplog. Remove the PRIMARY, bring back the two not-going-to-roll-back nodes, wait for them to receive the replication progress of the to-be-rolled-back PRIMARY, then remove the other to-be-rolled-back node. After a new PRIMARY is elected, do one new write. We should then be able to erroneously satisfy writeConcern w:3 for any optime between the point of divergence and the to-be-rolled-back nodes&apos; last optime.&lt;/p&gt;</description>
                <environment></environment>
        <key id="174890">SERVER-16570</key>
            <summary>writeConcerns could be erroneously satisfied after a rollback occurs</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="9">Done</resolution>
                                        <assignee username="matt.dannenberg">Matt Dannenberg</assignee>
                                    <reporter username="matt.dannenberg">Matt Dannenberg</reporter>
                        <labels>
                    </labels>
                <created>Tue, 16 Dec 2014 20:58:43 +0000</created>
                <updated>Wed, 26 Aug 2015 22:23:23 +0000</updated>
                            <resolved>Wed, 26 Aug 2015 18:58:36 +0000</resolved>
                                    <version>2.8.0-rc2</version>
                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>15</watches>
                                                                                                                <comments>
                            <comment id="1015307" author="mattd@10gen.com" created="Wed, 26 Aug 2015 18:58:36 +0000"  >&lt;p&gt;This can no longer happen as a result of the j:true writeConcern work.&lt;/p&gt;</comment>
                            <comment id="882378" author="charlie.page@10gen.com" created="Wed, 15 Apr 2015 23:33:12 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=asya&quot; class=&quot;user-hover&quot; rel=&quot;asya&quot;&gt;asya&lt;/a&gt; yes, I think what we are looking for is a write as defined by consensus theory with means commit to durable storage.&lt;/p&gt;</comment>
                            <comment id="882349" author="asya" created="Wed, 15 Apr 2015 22:45:16 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.page%4010gen.com&quot; class=&quot;user-hover&quot; rel=&quot;charlie.page@10gen.com&quot;&gt;charlie.page@10gen.com&lt;/a&gt; it looks like &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-5218&quot; title=&quot;Add a write concern to wait for journal on all &amp;#39;w&amp;#39; servers&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-5218&quot;&gt;&lt;del&gt;SERVER-5218&lt;/del&gt;&lt;/a&gt; already will prevent the sequence of events you describe.&lt;/p&gt;

&lt;p&gt;So this ticket then is about being able to differentiate timelines, which I think may be subsumed by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12385&quot; title=&quot;election algorithm modifications&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12385&quot;&gt;&lt;del&gt;SERVER-12385&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="789703" author="charlie.page@10gen.com" created="Thu, 18 Dec 2014 18:03:32 +0000"  >&lt;p&gt;Let us consider a cluster where this has happened and a network partition has happened.  There is a 3 node replica set.&lt;br/&gt;
1. Node 1 accepts a write&lt;br/&gt;
2. Node 2 replicates the write&lt;br/&gt;
2a. Node 1 acks w:majority to the client&lt;br/&gt;
3. Node 2 rollbacks back/ the write was only in memory and a restart clears it&lt;br/&gt;
4. Node 1 goes down&lt;br/&gt;
4a. Node 3 never got the write&lt;br/&gt;
5. Node 2 and 3 elect node 2 or 3 primary (doesn&apos;t matter which one)&lt;br/&gt;
6. Data is lost when node 1 comes back and rolls back the w:majority write&lt;/p&gt;

&lt;p&gt;If node 2 (the rollback node) isn&apos;t allowed to participate in elections (which it can do by not responding to election RPCs) until it has caught up with a primary in its current term, or a later term, then this won&apos;t happen without manual intervention.  (If the max oplog time is written to disk prior to ack&apos;ing the write, then even without journaling we can know we&apos;ve rolled back state on retarted.  If nothing durable is noted then we silently rollback.)&lt;/p&gt;

&lt;p&gt;Another (longer term) solution is to convert the oplog to a journal format so writes are only performed a) once b) are only compressed on disk and c) acknowledges writes when they are made durable (such that they can be applied to the database on startup).&lt;/p&gt;

&lt;p&gt;The problem with have rollback, ever (i.e. in GLE, etc), is that there is always an issue.  Rollback means reverting to a state we&apos;ve previously acknowledged being (which may or may not include an actual rollback).  Allowing the status to rollback still doesn&apos;t account for the situation where the client is informed between 2a and 3.  The system needs to be able to only make forward progress without human intervention (the assumption being that humans then understand they are potentially causing data loss).&lt;/p&gt;</comment>
                            <comment id="787794" author="schwerin" created="Wed, 17 Dec 2014 00:05:41 +0000"  >&lt;p&gt;For this to occur, a newly elected primary must receive a request to wait for replication to reach an optime on the &lt;b&gt;new&lt;/b&gt; timeline that took place before the newest date on the &lt;b&gt;old&lt;/b&gt; timeline.  I wonder if composing optimes of term and offset could be used to distinguish this case and make the problem go away...&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="106427">SERVER-12385</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>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 17 Dec 2014 00:05:41 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 25 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 25 weeks ago
                        </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>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>charlie.page@10gen.com</customfieldvalue>
            <customfieldvalue>matt.dannenberg</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlgin:</customfieldvalue>

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

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

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