<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:58:09 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-21700] Do not relax constraints during steady state replication</title>
                <link>https://jira.mongodb.org/browse/SERVER-21700</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In order to do this we would need to decide what should be done when a document cannot be found to update. The current behavior, of potentially creating a partial document, has some downsides when users make changes independent of replication, like during manual maintenance (or user/admin mistakes).&lt;/p&gt;

&lt;p&gt;We may also only want to make this change during normal replication, not when re-applying from a failed batch, during rollback, or in other cases where we may be working with repeated operations.&lt;/p&gt;</description>
                <environment></environment>
        <key id="241486">SERVER-21700</key>
            <summary>Do not relax constraints during steady state replication</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="matthew.russotto@mongodb.com">Matthew Russotto</assignee>
                                    <reporter username="scotthernandez">Scott Hernandez</reporter>
                        <labels>
                            <label>PM-843</label>
                            <label>former-quick-wins</label>
                    </labels>
                <created>Mon, 30 Nov 2015 19:22:34 +0000</created>
                <updated>Fri, 10 Nov 2023 15:00:01 +0000</updated>
                            <resolved>Thu, 12 Mar 2020 20:32:26 +0000</resolved>
                                                    <fixVersion>4.7.0</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>23</watches>
                                                                                                                <comments>
                            <comment id="2976456" author="xgen-internal-githook" created="Thu, 12 Mar 2020 20:09:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matthew Russotto&apos;, &apos;username&apos;: &apos;mtrussotto&apos;, &apos;email&apos;: &apos;matthew.russotto@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-21700&quot; title=&quot;Do not relax constraints during steady state replication&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-21700&quot;&gt;&lt;del&gt;SERVER-21700&lt;/del&gt;&lt;/a&gt; Do not relax constraints during steady state replication.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/497f50a5e25db6171290f6e791ad02dd2b607498&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/497f50a5e25db6171290f6e791ad02dd2b607498&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2584375" author="judah.schvimer" created="Wed, 4 Dec 2019 22:49:06 +0000"  >&lt;p&gt;This may depend on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44450&quot; title=&quot;Do not add fromMigrate field to applyOps insert oplog entries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44450&quot;&gt;&lt;del&gt;SERVER-44450&lt;/del&gt;&lt;/a&gt; as described in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44450?focusedCommentId=2584363&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-2584363&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="2410698" author="judah.schvimer" created="Fri, 6 Sep 2019 14:58:54 +0000"  >&lt;p&gt;Note, we cannot allow document validation on secondaries since we can bypass it on primaries without logging that we do so in the oplog.&lt;/p&gt;</comment>
                            <comment id="2406042" author="judah.schvimer" created="Tue, 3 Sep 2019 20:16:00 +0000"  >&lt;p&gt;We also relax &lt;tt&gt;NamespaceNotFound&lt;/tt&gt; errors in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ff685d2d6e370594261eccbef8e60b2f7cc61e28/src/mongo/db/repl/sync_tail.cpp#L346-L353&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;recovering and on deletes&lt;/a&gt;. I don&apos;t know why deletes here are special compared to updates or inserts. The justification for relaxing &lt;tt&gt;NamespaceNotFound&lt;/tt&gt; errors in recovering only applies to eMRC=F now that the ticket mentioned in the todo in the code is complete.&lt;/p&gt;</comment>
                            <comment id="2379900" author="jesse" created="Tue, 20 Aug 2019 21:43:23 +0000"  >&lt;p&gt;Additional issue to consider: today, users can call applyOps directly with oplogApplicationMode: &quot;InitialSync&quot; and alwaysUpsert: false. We expect this to be &lt;b&gt;not&lt;/b&gt; an upsert, and therefore to fail if the target document does not exist, see apply_ops_mode.js.&lt;/p&gt;

&lt;p&gt;However, if applyOps is actually being executed during initial sync with alwaysUpsert: false and the target document does not exist, we ignore the failure and continue applying the rest of the operations in the applyOps command, as well as the rest of the oplog entries in the overall batch.&lt;/p&gt;

&lt;p&gt;This is surprising. The behavior of applyOps differs depending on whether a user is calling it with oplogApplicationMode: &quot;InitialSync&quot; versus when it&apos;s actually executed during initial sync.&lt;/p&gt;</comment>
                            <comment id="2367579" author="judah.schvimer" created="Mon, 12 Aug 2019 19:50:13 +0000"  >&lt;p&gt;We may want or need to stop putting atomic applyOps commands into the oplog as the user gives them to us and start transforming them into the writes we actually do (but keep them in applyOps to be atomic and have no upgrade/downgrade concerns).&lt;/p&gt;</comment>
                            <comment id="2364752" author="judah.schvimer" created="Fri, 9 Aug 2019 15:18:28 +0000"  >&lt;p&gt;Note that during initial sync we currently do &lt;em&gt;not&lt;/em&gt; turn updates into upserts, so we should never have to turn updates into upserts during oplog application. We will only upsert if the &apos;b&apos; field is set or if an &apos;applyOps&apos; oplog entry specifies to &apos;alwaysUpsert&apos;.&lt;/p&gt;</comment>
                            <comment id="2364526" author="judah.schvimer" created="Fri, 9 Aug 2019 14:08:50 +0000"  >&lt;p&gt;We will need to do something about updates on capped collections. A document may be deleted on the secondary before the primary so an update that worked on the primary could fail on the secondary. This currently becomes an upsert, which can cause problems like &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38724&quot; title=&quot;Under rare conditions, updates to capped collections can cause SECONDARY members to fail&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38724&quot;&gt;&lt;del&gt;SERVER-38724&lt;/del&gt;&lt;/a&gt;. Instead of turning updates into upserts on capped collections, just ignoring when an update modifies 0 documents on a capped collection (something we&apos;ll want to error on for normal collections) seems cleaner.&lt;/p&gt;</comment>
                            <comment id="2363579" author="ratika.gandhi" created="Thu, 8 Aug 2019 20:22:11 +0000"  >&lt;p&gt;Will be scheduled in Repl&apos;s Q3 quick win bucket&lt;/p&gt;</comment>
                            <comment id="2363106" author="judah.schvimer" created="Thu, 8 Aug 2019 16:15:49 +0000"  >&lt;p&gt;The plan is to:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Turn this constraint enforcement on in our tests but not by default.&lt;/li&gt;
	&lt;li&gt;We will add a &lt;tt&gt;serverStatus&lt;/tt&gt; metric that we increment whenever one of these constraints is broken. i.e. even when the constraints aren&apos;t being enforced, when would their enforcement have caused a node to crash? This will let us collect data on 4.4 about whether future releases should turn the enforcement on by default.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;As a result, I think it may make sense to do this all together. The implementer can decide.&lt;/p&gt;

&lt;p&gt;An open question is &quot;Should not being able to apply an op cause an election instead of a crash?&quot;.&lt;/p&gt;</comment>
                            <comment id="2362143" author="judah.schvimer" created="Wed, 7 Aug 2019 23:35:16 +0000"  >&lt;p&gt;I&apos;ll file separate tickets for 2-4 above and command acceptable errors. There will be 5 tickets in total. I&apos;m going to mark them all &quot;depends on&quot; the oplog application refactor (though not part of that epic) so we&apos;re not messing around in there too much at once. Since it&apos;s been like this for a while I think it&apos;s ok not to backport it, so doing it after that will likely be easier.&lt;/p&gt;</comment>
                            <comment id="2362050" author="milkie" created="Wed, 7 Aug 2019 21:37:59 +0000"  >&lt;p&gt;Great, I concur &amp;#8211; can we change the title and description to reflect this?  Or should we file separate tickets for that work... some of those might be harder than others and we may want to deploy those changes piecemeal.&lt;/p&gt;</comment>
                            <comment id="2361902" author="judah.schvimer" created="Wed, 7 Aug 2019 20:04:46 +0000"  >&lt;p&gt;I wasn&apos;t clear. I&apos;m hoping this ticket can tighten up all of these constraints. I agree that we currently relax them all unnecessarily.&lt;/p&gt;</comment>
                            <comment id="2361869" author="milkie" created="Wed, 7 Aug 2019 19:42:37 +0000"  >&lt;p&gt;In today&apos;s code are we continuing to do all 4, or have we tightened up some things already?&lt;/p&gt;</comment>
                            <comment id="2361842" author="judah.schvimer" created="Wed, 7 Aug 2019 19:32:57 +0000"  >&lt;p&gt;Outside of initial sync, recovering, and the applyOps command (so during steady state replication), we do not want to:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;turn updates into upserts&lt;/li&gt;
	&lt;li&gt;turn inserts into upserts&lt;/li&gt;
	&lt;li&gt;ignore index constraints&lt;/li&gt;
	&lt;li&gt;ignore when we delete 0 documents applying a delete operation (we should always delete 1 document).&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Command &quot;acceptable errors&quot; should also only be &quot;acceptable&quot; outside of steady state replication.&lt;/p&gt;

&lt;p&gt;These being violated would all imply data corruption.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="319277">SERVER-26358</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="658850">SERVER-38724</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="343112">SERVER-27594</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                            <outwardlinks description="has to be done before">
                                        <issuelink>
            <issuekey id="1157158">SERVER-46221</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                        <issuelink>
            <issuekey id="1284079">SERVER-47022</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="440503">SERVER-31387</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="472341">SERVER-32346</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="488107">SERVER-32937</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="918478">SERVER-43193</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="990828">SERVER-44450</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1212852">SERVER-46550</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1220181">SERVER-46603</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1233361">SERVER-46656</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1451896">SERVER-50532</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1926546">SERVER-61532</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1306544">SERVER-47383</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2189756">SERVER-71490</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="334883">SERVER-27205</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="507091">SERVER-33719</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1045380">SERVER-45033</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1372466">SERVER-48593</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1286677">SERVER-47053</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1605955">SERVER-54150</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="243063">SERVER-21829</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>15.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="18953"><![CDATA[v4.4]]></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>Wed, 7 Aug 2019 19:32:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 47 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/PM-1469'>PM-1469</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_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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1664</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>yuan.fang@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 47 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>30.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>jesse@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>matthew.russotto@mongodb.com</customfieldvalue>
            <customfieldvalue>ratika.gandhi@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|hrknf3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hwbvmv:</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="3575">Repl 2020-02-10</customfieldvalue>
    <customfieldvalue id="3576">Repl 2020-02-24</customfieldvalue>
    <customfieldvalue id="3577">Repl 2020-03-09</customfieldvalue>
    <customfieldvalue id="3766">Repl 2020-03-23</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|hsfej3:</customfieldvalue>

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