<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:48:10 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-38174] Starting replica set member standalone can lose committed writes starting in MongoDB 4.0</title>
                <link>https://jira.mongodb.org/browse/SERVER-38174</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Starting in 4.0 we do recovery at startup (for everything but the oplog) by replaying the oplog instead of by journaling. However this is not done by default if a replica set member is started standalone, so we can lose committed writes in this case. Restarting a replica set member standalone is a common documented maintenance procedure, so losing committed writes in this case seems possibly problematic. This is also a change in behavior from 3.6.&lt;/p&gt;

&lt;p&gt;There is an undocumented parameter to do oplog replay when started as standalone; suggest that this should be enabled by default.&lt;/p&gt;</description>
                <environment></environment>
        <key id="634991">SERVER-38174</key>
            <summary>Starting replica set member standalone can lose committed writes starting in MongoDB 4.0</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="13202">Works as Designed</resolution>
                                        <assignee username="judah.schvimer@mongodb.com">Judah Schvimer</assignee>
                                    <reporter username="bruce.lucas@mongodb.com">Bruce Lucas</reporter>
                        <labels>
                    </labels>
                <created>Fri, 16 Nov 2018 13:27:28 +0000</created>
                <updated>Fri, 27 Oct 2023 13:53:25 +0000</updated>
                            <resolved>Wed, 28 Nov 2018 15:15:25 +0000</resolved>
                                    <version>4.0.0</version>
                                                    <component>Replication</component>
                                        <votes>1</votes>
                                    <watches>15</watches>
                                                                                                                <comments>
                            <comment id="2066291" author="schwerin" created="Mon, 19 Nov 2018 15:23:28 +0000"  >&lt;p&gt;I just filed &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-12213&quot; title=&quot;Clarify when and how to put replica set members into standalone mode for maintenance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-12213&quot;&gt;&lt;del&gt;DOCS-12213&lt;/del&gt;&lt;/a&gt; to cover the documentation. I was going to make the same proposal, &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;.&lt;/p&gt;</comment>
                            <comment id="2066290" author="judah.schvimer" created="Mon, 19 Nov 2018 15:22:21 +0000"  >&lt;p&gt;I think you bring up valid reasons for documenting this unexpected behavior. Anyone opposed to closing this as &quot;Works As Designed&quot; with documentation changes needed?&lt;/p&gt;</comment>
                            <comment id="2065565" author="bruce.lucas@10gen.com" created="Sat, 17 Nov 2018 13:41:47 +0000"  >&lt;p&gt;OK. I think we need to document and communicate more clearly&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;the supported maintenance operations running standalone&lt;/li&gt;
	&lt;li&gt;the existence and necessity of the recoverFromOplogAsStandalone flag for maintenance operations that require read access to data, e.g. data recovery&lt;/li&gt;
	&lt;li&gt;the difference in behavior between 3.6 and 4.0&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="2064956" author="schwerin" created="Fri, 16 Nov 2018 18:43:54 +0000"  >&lt;p&gt;Maintenance operations that change the data are dangerous on standalones anyways. The only safe maintenance would be writes to local collections and index builds. The index builds are only safe in retrospect if after rejoining the cluster a conflicting document is not found, but that was true in 3.6, too.&lt;/p&gt;

&lt;p&gt;We didn&#8217;t enter this decision lightly, and we did do it intentionally, so I think this is as-designed.&lt;/p&gt;</comment>
                            <comment id="2064773" author="bruce.lucas@10gen.com" created="Fri, 16 Nov 2018 17:59:38 +0000"  >&lt;p&gt;Independent of particular use cases, we support an invariant that committed writes can be read, and it seems surprising that that invariant doesn&apos;t hold when you start the node standalone, especially when it did in 3.6. I&apos;m leery of saying that there are no legitimate maintenance procedures that depend on reading committed writes.&lt;/p&gt;</comment>
                            <comment id="2064645" author="milkie" created="Fri, 16 Nov 2018 16:32:02 +0000"  >&lt;p&gt;Your concerns about rolling index builds are a problem regardless of whether or not the writes are pending in the local oplog buffer or pending in an upstream node&apos;s buffer, even before this new behavior was added.&lt;/p&gt;</comment>
                            <comment id="2064570" author="bruce.lucas@10gen.com" created="Fri, 16 Nov 2018 15:52:58 +0000"  >&lt;p&gt;Agreed, &quot;lost&quot; is not quite the right word.&lt;/p&gt;

&lt;p&gt;I don&apos;t know that we restrict maintenance operations to rolling index builds; our documentation describes it as a general procedure for maintenance. &lt;/p&gt;

&lt;p&gt;Wouldn&apos;t rolling index builds though be an example of something that could misbehave, for example if the unapplied oplog entries contain a conflicting index build, or drop the index being built, or contain writes that conflict with the index (e.g. violate unique key constraints)?&lt;/p&gt;</comment>
                            <comment id="2064460" author="judah.schvimer" created="Fri, 16 Nov 2018 15:01:53 +0000"  >&lt;p&gt;&quot;recoverFromOplogAsStandalone&quot; puts the node in read-only mode, so I do not think that would be an acceptable default. We also have a startup warning that calls this out explicitly: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30464&quot; title=&quot;Edit startup warning when running replset member as standalone to mention that data may look inconsistent&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30464&quot;&gt;&lt;del&gt;SERVER-30464&lt;/del&gt;&lt;/a&gt;. Given that restarting the node as a replica set node brings the node back up to a consistent state, I don&apos;t think this counts as data loss since the data is still there, it&apos;s just not visible in standalone mode.&lt;/p&gt;</comment>
                            <comment id="2064450" author="milkie" created="Fri, 16 Nov 2018 14:59:44 +0000"  >&lt;p&gt;I don&apos;t understand how the writes can be lost?  Certainly, shutting down a secondary leaves it in some state with some amount of writes on it (but the exact number is not explicitly controllable by the user).   I would expect users are using this mode to build indexes in a rolling fashion, or to run validate.  I don&apos;t expect users to be looking at the data on a standalone &amp;#8211; is that what you mean by &quot;losing committed writes&quot;?  The writes aren&apos;t lost, as once you put the node back in the replica set it picks up where it left off, as long as you didn&apos;t corrupt the data while in standalone mode by performing writes.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="635978">DOCS-12213</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="641798">DOCS-12230</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="641799">SERVER-38356</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>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 16 Nov 2018 14:59:44 +0000</customfieldvalue>

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


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_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>
                            5 years, 12 weeks, 2 days 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>bruce.lucas@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hud2rz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hu38nr:</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="2606">Repl 2018-12-03</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|hucp1b:</customfieldvalue>

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