<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:17:38 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-8511] Live oplog can be dropped</title>
                <link>https://jira.mongodb.org/browse/SERVER-8511</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;During the training, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=scotthernandez&quot; class=&quot;user-hover&quot; rel=&quot;scotthernandez&quot;&gt;scotthernandez&lt;/a&gt; managed to drop the oplog on a slaveDelay secondary that was currently active with:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.getSiblingDB(&quot;local&quot;).oplog.rs.drop()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.getSiblingDB(&quot;local&quot;).oplog.rs.stats()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Now returns:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;ok&quot; : 0, &quot;errmsg&quot; : &quot;ns not found&quot; }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment></environment>
        <key id="64887">SERVER-8511</key>
            <summary>Live oplog can be dropped</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="milkie@mongodb.com">Eric Milkie</assignee>
                                    <reporter username="derick">Derick Rethans</reporter>
                        <labels>
                            <label>oplog</label>
                    </labels>
                <created>Mon, 11 Feb 2013 20:15:32 +0000</created>
                <updated>Tue, 5 Apr 2016 14:54:37 +0000</updated>
                            <resolved>Mon, 10 Nov 2014 22:26:29 +0000</resolved>
                                                    <fixVersion>2.8.0-rc0</fixVersion>
                                    <component>Replication</component>
                                        <votes>2</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="761072" author="xgen-internal-githook" created="Tue, 11 Nov 2014 12:45:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8511&quot; title=&quot;Live oplog can be dropped&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8511&quot;&gt;&lt;del&gt;SERVER-8511&lt;/del&gt;&lt;/a&gt; move oplog-dropping test to noPassthrough suite&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/93aaab7e2ca64e330959c403b36d50fdb609e86e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/93aaab7e2ca64e330959c403b36d50fdb609e86e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="760822" author="xgen-internal-githook" created="Tue, 11 Nov 2014 00:11:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jrassi&apos;, u&apos;name&apos;: u&apos;Jason Rassi&apos;, u&apos;email&apos;: u&apos;rassi@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8511&quot; title=&quot;Live oplog can be dropped&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8511&quot;&gt;&lt;del&gt;SERVER-8511&lt;/del&gt;&lt;/a&gt; Disable oplog dropping test in query_oplogreplay.js&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/92d967e8cd4d32f3b3348c89320f238df47a1454&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/92d967e8cd4d32f3b3348c89320f238df47a1454&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="760696" author="xgen-internal-githook" created="Mon, 10 Nov 2014 22:22:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8511&quot; title=&quot;Live oplog can be dropped&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8511&quot;&gt;&lt;del&gt;SERVER-8511&lt;/del&gt;&lt;/a&gt; prohibit local db and oplog collection from being dropped while replication is active&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e765b6a3544b325b52c270c3743827fa963b0d10&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e765b6a3544b325b52c270c3743827fa963b0d10&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="510619" author="schwerin" created="Thu, 6 Mar 2014 14:56:17 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andreas.nilsson%4010gen.com&quot; class=&quot;user-hover&quot; rel=&quot;andreas.nilsson@10gen.com&quot;&gt;andreas.nilsson@10gen.com&lt;/a&gt;, I think so.  The builtin roles allowing write on the local database do allow dropping collections in that database, but &quot;drop collection&quot; has its own action type, so you could use UDR to prevent writers to local from dropping collections there.&lt;/p&gt;</comment>
                            <comment id="510610" author="milkie" created="Thu, 6 Mar 2014 14:46:28 +0000"  >&lt;p&gt;We may end up moving the oplog to a custom, optimized replication solution and out of the general database structure, which would make protecting it easier.&lt;/p&gt;</comment>
                            <comment id="510606" author="andreas.nilsson@10gen.com" created="Thu, 6 Mar 2014 14:37:46 +0000"  >&lt;p&gt;&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;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schwerin&quot; class=&quot;user-hover&quot; rel=&quot;schwerin&quot;&gt;schwerin&lt;/a&gt; do we have a specific action type for this? &lt;/p&gt;

&lt;p&gt;More specifically can we consider UDR solving this ticket from Eliot&apos;s perspective of being handled by the access control system?&lt;/p&gt;</comment>
                            <comment id="462265" author="eliot" created="Tue, 26 Nov 2013 20:31:44 +0000"  >&lt;p&gt;I think this should be handled by the security system.&lt;br/&gt;
Some users might be able to do such things, but regular users not.&lt;/p&gt;</comment>
                            <comment id="281874" author="milkie" created="Tue, 5 Mar 2013 16:55:02 +0000"  >&lt;p&gt;I guess my point is there are a lot of other system related tables, even in the local database, where similar bad things might happen if you try to drop them on purpose.  I don&apos;t think it&apos;s a bug that if you try to break your server on purpose, it breaks.&lt;/p&gt;</comment>
                            <comment id="281846" author="scotthernandez" created="Tue, 5 Mar 2013 16:30:50 +0000"  >&lt;p&gt;If you drop the primary oplog then all secondaries go into immediate &quot;too stale&quot; mode and all replication fails requiring a full resync, or promotion with no chance of rollback. All kinds of things break operationally and we cannot ensure normal system behavior.&lt;/p&gt;

&lt;p&gt;Yes, there are malicious as well as accidental reasons this could be done. As it is logically a &quot;system&quot; collection used internally it should not be user droppable while being used. It is unexpected that it is not recreated automatically when an op is logged in the oplog (which is gone). I would have expected the system to gracefully recover (creating a new oplog), error out (since the write cannot be replicated, nor saved for replication) or shutdown (due to being in an invalid state &amp;#8211; a replica without an oplog).&lt;/p&gt;

&lt;p&gt;I&apos;m not sure what refocusing is needed. It is a bug that it can be dropped, no matter what the reason. &lt;/p&gt;</comment>
                            <comment id="281834" author="milkie" created="Tue, 5 Mar 2013 16:15:11 +0000"  >&lt;p&gt;Is the concern that this will happen by accident?   I think that&apos;s unlikely.&lt;br/&gt;
However, there is a concern that users with write access to the local database can drop important collections maliciously.  Should this ticket be refocused on that aspect?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="141432">SERVER-14222</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="95786">SERVER-11383</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="129328">SERVER-13483</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="24005" name="IMAG1681.jpg" size="921128" author="derick" created="Mon, 11 Feb 2013 20:15:33 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 5 Mar 2013 16:15:11 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 14 weeks, 1 day 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>robert.guo@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            9 years, 14 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andreas.nilsson</customfieldvalue>
            <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>derick</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</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|hrn7h3:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3882</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;var rt = new ReplSetTest(&lt;/p&gt;
{nodes:2, useHostName:false, oplogSize:2}
&lt;p&gt;)&lt;br/&gt;
rt.startSet()&lt;br/&gt;
rt.initiate()&lt;br/&gt;
var mFoo = rt.getMaster().getDB(&quot;test&quot;).foo;&lt;br/&gt;
var sFoo = rt.getSecondary().getDB(&quot;test&quot;).foo;&lt;br/&gt;
var sOplog = rt.getSecondary().getDB(&quot;local&quot;).oplog.rs&lt;br/&gt;
var mOplog = rt.getPrimary().getDB(&quot;local&quot;).oplog.rs&lt;br/&gt;
var counts = function () { return {m:mFoo.count(), s:sFoo.count() }}&lt;br/&gt;
mFoo.insert({})&lt;br/&gt;
mFoo.insert({});mFoo.getDB().getLastError(2);&lt;br/&gt;
printjson(sOplog.find().sort({$natural:-1}).limit(-1).next())&lt;br/&gt;
printjson(sOplog.drop())&lt;br/&gt;
printjson(counts())&lt;br/&gt;
mFoo.insert({});mFoo.getDB().getLastError();&lt;br/&gt;
printjson(counts())&lt;br/&gt;
sOplog.getDB().createCollection(&quot;oplog.rs&quot;, &lt;/p&gt;
{capped:true, size:500000}
&lt;p&gt;)&lt;br/&gt;
mFoo.insert({});mFoo.getDB().getLastError(2);&lt;br/&gt;
var newEntry = sOplog.find().sort({$natural:-1}).limit(-1).next()&lt;br/&gt;
printjson(newEntry)&lt;br/&gt;
printjson(counts())&lt;/p&gt;

&lt;p&gt;printjson(sOplog.drop())&lt;br/&gt;
mFoo.insert({});mFoo.getDB().getLastError();&lt;br/&gt;
printjson(counts())&lt;br/&gt;
mOplog.getDB().createCollection(&quot;oplog.rs&quot;, &lt;/p&gt;
{capped:true, size:500000}
&lt;p&gt;)&lt;br/&gt;
mFoo.insert({});mFoo.getDB().getLastError();&lt;br/&gt;
printjson(counts())&lt;br/&gt;
rt.stopSet()&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10166" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Tests Written</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10154"><![CDATA[Complete]]></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|hsztxj:</customfieldvalue>

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