<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:21:56 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-9965] Mongo Primary misses certain writes to the Oplog</title>
                <link>https://jira.mongodb.org/browse/SERVER-9965</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This may be related to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8313&quot; title=&quot;Why slave always crash due to duplicated key?&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8313&quot;&gt;&lt;del&gt;SERVER-8313&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I have removed some information due to NDA restrictions.  If neccesary I will include that information.&lt;/p&gt;

&lt;p&gt;On a client&apos;s site where we are running 20 replica sets in a sharded cluster, with the unique shard key &quot;ownerId, profileId, instanceId&quot;, we find that on occasion we get the following error on a rs.status():&lt;/p&gt;

&lt;p&gt;&quot;errmsg&quot; : &quot;syncTail: 11000 E11000 duplicate key error index: &amp;lt;removed&amp;gt;  dup key: { : &amp;lt;removed&amp;gt; }, syncing: &lt;/p&gt;
{ ts: Timestamp 1370449518000|2, h: 7055153591203270570, op: \&quot;i\&quot;, ns: \&quot;&amp;lt;db&amp;gt;&quot;}

&lt;p&gt;This appears on both the secondaries, and at that point they stop replicating from the primary.  The only way we have found to resolve this is to stop the secondaries and re-sync them from the primary, which is time-consuming and doesn&apos;t really give the customer confidence in our solution.&lt;/p&gt;

&lt;p&gt;Upon closer investigation, we found the following in the oplog on the primary.  The parts mark in &amp;lt;xxx&amp;gt; all match each other.  The entries are sorted by _id to ensure that the same entries go together.&lt;/p&gt;

&lt;p&gt;51ad5a4deefa529ba5336e7a&lt;br/&gt;
------------------&lt;br/&gt;
{ &quot;ts&quot; : &lt;/p&gt;
{ &quot;t&quot; : 1370315341000 , &quot;i&quot; : 2 }
&lt;p&gt;, &quot;h&quot; : -7125820950950980008, &quot;op&quot; : &quot;i&quot;, &quot;ns&quot; : &quot;&amp;lt;db&amp;gt;.default&quot;, &quot;o&quot; : { &quot;_id&quot; : &lt;/p&gt;
{ &quot;$oid&quot; : &quot;51ad5a4deefa529ba5336e7a&quot; }
&lt;p&gt;, &quot;ownerId&quot; : &quot;&amp;lt;number&amp;gt;&quot;, &quot;profileId&quot; : &quot;&amp;lt;package&amp;gt;&quot;, &quot;instanceId&quot; : &quot;&amp;lt;instance&amp;gt;&quot;, &quot;state&quot; : &quot;active&quot;, &quot;createDateTime&quot; : 1370315341, &quot;startDateTime&quot; : 1370315341, &quot;expireDateTime&quot; : 1370401741, &quot;removeDateTime&quot; : 1370401741, &quot;cancelled&quot; : false, &quot;mode&quot; : &quot;onceOff&quot;, &quot;properties&quot; : &lt;/p&gt;
{ &quot;0&quot; : &quot;&amp;lt;remove&amp;gt;:remove:&amp;lt;instance&amp;gt;&quot;, &quot;1&quot; : &quot;&amp;lt;remove&amp;gt;:delete:1055&quot; }
&lt;p&gt; } }&lt;br/&gt;
{ &quot;ts&quot; : &lt;/p&gt;
{ &quot;t&quot; : 1370347540000 , &quot;i&quot; : 3 }
&lt;p&gt;, &quot;h&quot; : -2674495216582342342, &quot;op&quot; : &quot;d&quot;, &quot;ns&quot; : &quot;&amp;lt;db&amp;gt;.default&quot;, &quot;b&quot; : true, &quot;o&quot; : { &quot;_id&quot; : &lt;/p&gt;
{ &quot;$oid&quot; : &quot;51ad5a4deefa529ba5336e7a&quot; }
&lt;p&gt; } }&lt;/p&gt;

&lt;p&gt;51add814fc83b2a3bc30b5e8&lt;br/&gt;
------------------&lt;br/&gt;
{ &quot;ts&quot; : &lt;/p&gt;
{ &quot;t&quot; : 1370347540000 , &quot;i&quot; : 4 }
&lt;p&gt;, &quot;h&quot; : -8427812199229652004, &quot;op&quot; : &quot;i&quot;, &quot;ns&quot; : &quot;&amp;lt;db&amp;gt;.default&quot;, &quot;o&quot; : { &quot;_id&quot; : &lt;/p&gt;
{ &quot;$oid&quot; : &quot;51add814fc83b2a3bc30b5e8&quot; }
&lt;p&gt;, &quot;ownerId&quot; : &quot;&amp;lt;number&amp;gt;&quot;, &quot;profileId&quot; : &quot;&amp;lt;package&amp;gt;&quot;, &quot;instanceId&quot; : &quot;&amp;lt;instance&amp;gt;&quot;, &quot;state&quot; : &quot;active&quot;, &quot;createDateTime&quot; : 1370347540, &quot;startDateTime&quot; : 1370347540, &quot;expireDateTime&quot; : 1370433940, &quot;removeDateTime&quot; : 1370433940, &quot;cancelled&quot; : false, &quot;mode&quot; : &quot;onceOff&quot;, &quot;properties&quot; : &lt;/p&gt;
{ &quot;0&quot; : &quot;&amp;lt;remove&amp;gt;:remove:&amp;lt;instance&amp;gt;&quot;, &quot;1&quot; : &quot;&amp;lt;remove&amp;gt;:delete:1055&quot; }
&lt;p&gt; } }&lt;br/&gt;
{ &quot;ts&quot; : &lt;/p&gt;
{ &quot;t&quot; : 1370433968000 , &quot;i&quot; : 6 }
&lt;p&gt;, &quot;h&quot; : 3274260589582880478, &quot;op&quot; : &quot;d&quot;, &quot;ns&quot; : &quot;&amp;lt;db&amp;gt;.default&quot;, &quot;b&quot; : true, &quot;o&quot; : { &quot;_id&quot; : &lt;/p&gt;
{ &quot;$oid&quot; : &quot;51add814fc83b2a3bc30b5e8&quot; }
&lt;p&gt; } }&lt;/p&gt;

&lt;p&gt;51af520f4000ab14865d3283&lt;br/&gt;
------------------&lt;br/&gt;
{ &quot;ts&quot; : &lt;/p&gt;
{ &quot;t&quot; : 1370444303000 , &quot;i&quot; : 177 }
&lt;p&gt;, &quot;h&quot; : 2830599934484141765, &quot;op&quot; : &quot;i&quot;, &quot;ns&quot; : &quot;&amp;lt;db&amp;gt;.default&quot;, &quot;o&quot; : { &quot;_id&quot; : &lt;/p&gt;
{ &quot;$oid&quot; : &quot;51af520f4000ab14865d3283&quot; }
&lt;p&gt;, &quot;ownerId&quot; : &quot;&amp;lt;number&amp;gt;&quot;, &quot;profileId&quot; : &quot;&amp;lt;package&amp;gt;&quot;, &quot;instanceId&quot; : &quot;&amp;lt;instance&amp;gt;&quot;, &quot;state&quot; : &quot;active&quot;, &quot;createDateTime&quot; : 1370444303, &quot;startDateTime&quot; : 1370444303, &quot;expireDateTime&quot; : 1370530703, &quot;removeDateTime&quot; : 1370530703, &quot;cancelled&quot; : false, &quot;mode&quot; : &quot;onceOff&quot;, &quot;properties&quot; : &lt;/p&gt;
{ &quot;0&quot; : &quot;&amp;lt;remove&amp;gt;:remove:&amp;lt;instance&amp;gt;&quot;, &quot;1&quot; : &quot;&amp;lt;remove&amp;gt;:delete:1055&quot; }
&lt;p&gt; } }&lt;/p&gt;

&lt;p&gt;51af666ed18b4aa6c892bbc9&lt;br/&gt;
------------------&lt;br/&gt;
{ &quot;ts&quot; : &lt;/p&gt;
{ &quot;t&quot; : 1370449518000 , &quot;i&quot; : 2 }
&lt;p&gt;, &quot;h&quot; : 7055153591203270570, &quot;op&quot; : &quot;i&quot;, &quot;ns&quot; : &quot;&amp;lt;db&amp;gt;.default&quot;, &quot;o&quot; : { &quot;_id&quot; : &lt;/p&gt;
{ &quot;$oid&quot; : &quot;51af666ed18b4aa6c892bbc9&quot; }
&lt;p&gt;, &quot;ownerId&quot; : &quot;&amp;lt;number&amp;gt;&quot;, &quot;profileId&quot; : &quot;&amp;lt;package&amp;gt;&quot;, &quot;instanceId&quot; : &quot;&amp;lt;instance&amp;gt;&quot;, &quot;state&quot; : &quot;active&quot;, &quot;createDateTime&quot; : 1370449518, &quot;startDateTime&quot; : 1370449518, &quot;expireDateTime&quot; : 1370535918, &quot;removeDateTime&quot; : 1370535918, &quot;cancelled&quot; : false, &quot;mode&quot; : &quot;onceOff&quot;, &quot;properties&quot; : &lt;/p&gt;
{ &quot;0&quot; : &quot;&amp;lt;remove&amp;gt;:remove:&amp;lt;instance&amp;gt;&quot;, &quot;1&quot; : &quot;&amp;lt;remove&amp;gt;:delete:1055&quot; }
&lt;p&gt; } }&lt;/p&gt;


&lt;p&gt;From this log it quickly became clear that the primary missed writing a delete entry into the oplog, causing a double-insert with the same key (ownerId, profileId, instanceId).  This would obviously cause a conflict on the secondary, and require intervention.  Unfortunately the issue only appears infrequently, making this very hard to duplicate or test.&lt;/p&gt;

&lt;p&gt;Is this something we can resolve by upgrading to a different version of MongoDB?  We are currently looking at going to 2.2.4.  However, I couldn&apos;t find a ticket in JIRA that seems to address this directly and is fixed in that version.&lt;/p&gt;</description>
                <environment>Solaris 10u9/10u10 using ZFS&lt;br/&gt;
Oracle Corporation SUN FIRE X4270 M2 SERVER&lt;br/&gt;
96GB RAM</environment>
        <key id="79561">SERVER-9965</key>
            <summary>Mongo Primary misses certain writes to the Oplog</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="matt.dannenberg">Matt Dannenberg</assignee>
                                    <reporter username="valerion">Braam van Heerden</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Jun 2013 11:27:07 +0000</created>
                <updated>Wed, 10 Dec 2014 23:11:53 +0000</updated>
                            <resolved>Fri, 2 Aug 2013 21:27:12 +0000</resolved>
                                    <version>2.0.8</version>
                                                    <component>Replication</component>
                    <component>Stability</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="394855" author="mattd@10gen.com" created="Fri, 2 Aug 2013 21:26:34 +0000"  >&lt;p&gt;I&apos;m closing this ticket. Feel free to re-open it if the issue occurs in 2.2.5&lt;/p&gt;</comment>
                            <comment id="368814" author="valerion" created="Thu, 27 Jun 2013 08:11:29 +0000"  >&lt;p&gt;Thanks for the reply.&lt;/p&gt;

&lt;p&gt;I will discuss a migration to 2.2.5 to our management and see what the timelines for this is.  This issue has occurred about 5-6 times in a 2-week period and not since then, so it seems to be very transient.&lt;/p&gt;</comment>
                            <comment id="368352" author="mattd@10gen.com" created="Wed, 26 Jun 2013 18:25:00 +0000"  >&lt;p&gt;I do not believe this is related to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8313&quot; title=&quot;Why slave always crash due to duplicated key?&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8313&quot;&gt;&lt;del&gt;SERVER-8313&lt;/del&gt;&lt;/a&gt; because &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8313&quot; title=&quot;Why slave always crash due to duplicated key?&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8313&quot;&gt;&lt;del&gt;SERVER-8313&lt;/del&gt;&lt;/a&gt; refers to features that were not implemented in 2.0.X.&lt;/p&gt;

&lt;p&gt;We can try further debugging by capturing all write operations (using db.adminCommand(&lt;/p&gt;
{setParameter: 1, logLevel: 1}
&lt;p&gt;)), but this may bloat your logs.&lt;/p&gt;

&lt;p&gt;2.2.5 contains significant improvements to oplog replication, both in stability and performance.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 26 Jun 2013 18:25:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 28 weeks, 5 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 28 weeks, 5 days 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="10023"><![CDATA[Solaris]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>valerion</customfieldvalue>
            <customfieldvalue>matt.dannenberg</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmpr3:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>72716</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;None found&lt;/p&gt;</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|ht015b:</customfieldvalue>

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