<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:27:17 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-31507] Add option to applyOps to fail on upgrade/downgrade</title>
                <link>https://jira.mongodb.org/browse/SERVER-31507</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We do this internally, but don&apos;t have it surfaced for external users like MongoMirror, backup, and Mongorestore.&lt;/p&gt;</description>
                <environment></environment>
        <key id="443622">SERVER-31507</key>
            <summary>Add option to applyOps to fail on upgrade/downgrade</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="judah.schvimer@mongodb.com">Judah Schvimer</assignee>
                                    <reporter username="judah.schvimer@mongodb.com">Judah Schvimer</reporter>
                        <labels>
                            <label>on-prem-3.5.6</label>
                    </labels>
                <created>Tue, 10 Oct 2017 22:07:58 +0000</created>
                <updated>Mon, 30 Oct 2023 23:12:53 +0000</updated>
                            <resolved>Tue, 31 Oct 2017 22:37:53 +0000</resolved>
                                                    <fixVersion>3.6.0-rc2</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="1714120" author="xgen-internal-githook" created="Tue, 31 Oct 2017 22:37:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;judah@mongodb.com&apos;, &apos;name&apos;: &apos;Judah Schvimer&apos;, &apos;username&apos;: &apos;judahschvimer&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31507&quot; title=&quot;Add option to applyOps to fail on upgrade/downgrade&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31507&quot;&gt;&lt;del&gt;SERVER-31507&lt;/del&gt;&lt;/a&gt; add option to specify oplog application mode in applyOps&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ced3d3341a2aac6a11297f7dcc2c3c6d2c0e3bec&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ced3d3341a2aac6a11297f7dcc2c3c6d2c0e3bec&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1706781" author="david.golden" created="Mon, 23 Oct 2017 22:21:14 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31630&quot; title=&quot;getParameter for featureCompatibilityVersion must expose targetVersion&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31630&quot;&gt;&lt;del&gt;SERVER-31630&lt;/del&gt;&lt;/a&gt; is an example of the kind of implementation change we&apos;d like this option to insulate tools from.&lt;/p&gt;</comment>
                            <comment id="1702866" author="judah.schvimer" created="Wed, 18 Oct 2017 17:12:29 +0000"  >&lt;p&gt;After confirming with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=spencer&quot; class=&quot;user-hover&quot; rel=&quot;spencer&quot;&gt;spencer&lt;/a&gt;, we&apos;ll go with just adding a &quot;mode&quot; field that takes a string. We&apos;ll document the exact field name and acceptable options once the ticket is complete.&lt;/p&gt;</comment>
                            <comment id="1702503" author="david.golden" created="Wed, 18 Oct 2017 13:59:00 +0000"  >&lt;p&gt;It&apos;s a prioritized list:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;At a minimum, I&apos;d like for tools/mongomirror to not need to know how FCV is implemented/stored and thus not need to specify in the tools how to detect if it&apos;s modified&lt;/li&gt;
	&lt;li&gt;Ideally, I&apos;d like for tools/mongomirror to be able to indicate something about their mode of operation and have the server reject &quot;unsafe&quot; operations for that mode&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I don&apos;t know the details enough to say what the modes are or what is safe/unsafe for different modes.  That is &amp;#8211; in part &amp;#8211; why I prefer a less granular model where that detailed knowledge isn&apos;t required  by the team maintaining tools/mongomirror &amp;#8211; and distinctly for all versions of the server in the support window.&lt;/p&gt;

&lt;p&gt;The notion of &quot;initial sync&quot; versus &quot;steady state replication&quot; seem logical to me.  I don&apos;t really follow the logic for splitting out upsert behavior (for instance) though I do think having the name &quot;alwaysUpsert&quot; mean more than that is confusing and should be fixed.&lt;/p&gt;

&lt;p&gt;Here&apos;s how I think of it in more detail:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;mongorestore is (more or less) equivalent to an initial sync&lt;/li&gt;
	&lt;li&gt;mongomirror is (more or less) equivalent to an initial sync, plus &amp;#8211; possibly, not sure if this is true &amp;#8211; a switchover to steady state replication after the oplog has been applied through the point where sync and index creation is finished&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;It would be great to be able to say what mode we&apos;re in and let the server determine what&apos;s good/bad for each mode based on the operation.  Eg. in &quot;initial sync&quot; mode (assuming I understand the issues correctly):&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;When FCV is 3.6, applyOps with renameCollection with a UUID -&amp;gt; that should be OK (it assumes the sync collection scan was done by UUID, but that&apos;s a fair assumption)&lt;/li&gt;
	&lt;li&gt;When FCV is 3.4, applyOps with renameCollection arrives -&amp;gt; that should error&lt;/li&gt;
	&lt;li&gt;For any FcV, applyOps changes FCV -&amp;gt; that should error&lt;/li&gt;
	&lt;li&gt;applyOps with update -&amp;gt; converted to upsert (or not converted, but error suppressed if doc doesn&apos;t exist, or whatever behavior is decided to be considered correct for initial sync)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;After writing all this up, maybe what I&apos;m suggesting is that we should specify a &quot;mode&quot; &amp;#8211; which could be &quot;initial sync&quot; or &quot;steady state&quot; (or &quot;rollback&quot; or whatever) &amp;#8211; rather than &quot;options&quot;.&lt;/p&gt;

&lt;p&gt;Does any of that make sense?&lt;/p&gt;</comment>
                            <comment id="1701143" author="judah.schvimer" created="Tue, 17 Oct 2017 13:56:13 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden&quot; class=&quot;user-hover&quot; rel=&quot;david.golden&quot;&gt;david.golden&lt;/a&gt;, I&apos;m confused what you&apos;d prefer. If we have a &quot;prohibitFCVChange&quot; flag, then we&apos;ll also need a &quot;prohibitUnsafeRenames&quot; flag, and you say you&apos;d prefer fewer options. If we do a &quot;prohibitUnsafeOperations&quot; flag, then we may run into a problem in the future where at different times different operations are unsafe and we&apos;d want to separate them out. &lt;/p&gt;</comment>
                            <comment id="1700818" author="david.golden" created="Tue, 17 Oct 2017 02:03:46 +0000"  >&lt;p&gt;Having multiple options has the problem that older tools won&apos;t know about the newer options and newer tools need to be updated for every server release and must be sure to know which options to apply when.  That adds complexity and raises the odds of user and/or implementation error.  (Also, having yet more things undocumented makes things harder as what to apply when and in what combinations winds up as tribal knowledge passed around by word of mouth.)&lt;/p&gt;

&lt;p&gt;Instead, having a simpler, stable API that delegates decisions about whether it&apos;s safe to apply certain operations is what tools/mongomirror are looking for.  However, at the very least we want to encapsulate concepts like &quot;prohibitFCVchange&quot; so that tools don&apos;t need to know the &lt;b&gt;implementation details&lt;/b&gt; of feature compatibility versioning  (collection names, field names, semantics, etc.).&lt;/p&gt;</comment>
                            <comment id="1699989" author="judah.schvimer" created="Mon, 16 Oct 2017 17:50:53 +0000"  >&lt;p&gt;applyOps currently has one flag called &quot;inSteadyStateReplication&quot; which is used to determine if we should convert updates to upserts, if we should fail renameCollection operations without UUIDs, and if we should fail applying upgrade/downgrade operations. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31387&quot; title=&quot;oplog application conflates upserting with being in steady state replication&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31387&quot;&gt;&lt;del&gt;SERVER-31387&lt;/del&gt;&lt;/a&gt; will separate out these three concepts so that the upserting behavior is tied to the &quot;alwaysUpsert&quot; option, and the upgrade/downgrade/renameCollection failing is only set internally during initial sync, and will always be off for external users of applyOps. This means that external implementations of initial sync (Mongorestore, MongoMirror, Cloud backup) all have to reimplement the upgrade/downgrade/renameCollection failing and take it out when we decide that it&apos;s safe again. It makes more sense to push this logic down to the server by surfacing an applyOps parameter to fail during upgrade/downgrade/renameCollection operations. &lt;/p&gt;

&lt;p&gt;The name and scope of this parameter is also a question. Should we have one parameter to fail renameCollection and one to fail upgradeDowngrade or just one in general to fail potentially unsafe operations? In future releases it&apos;s possible a different set of operations will be unsafe, however it&apos;s generally advisable to avoid adding a bunch of new options. I think adding an option for each different failure mode would be the clearest and best. It&apos;ll be fairly easy to alert downstream users, and they won&apos;t be documented so they can be easily added/removed.&lt;/p&gt;</comment>
                            <comment id="1697693" author="spencer" created="Thu, 12 Oct 2017 20:31:45 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer&quot;&gt;judah.schvimer&lt;/a&gt; Can you summarize our discussion from today about this and lay out the possibilities with some pros/cons?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="440503">SERVER-31387</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="447838">SERVER-31630</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="440472">SERVER-31384</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>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_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>Thu, 12 Oct 2017 20:31:45 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 15 weeks, 1 day 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-31387'>SERVER-31387</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_14262" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>End date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 18 Oct 2017 00:00:00 +0000</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>
                            6 years, 15 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.golden@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hthiav:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|ht9e9b:</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="1915">Repl 2017-10-23</customfieldvalue>
    <customfieldvalue id="1931">Repl 2017-11-13</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14261" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 10 Oct 2017 00:00:00 +0000</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|hth4en:</customfieldvalue>

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