<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:15:52 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-7888]  E11000 duplicate key error index while stopping the Balancer</title>
                <link>https://jira.mongodb.org/browse/SERVER-7888</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Our MongoDB Backup script (python) disables the balancer using:&lt;/p&gt;

&lt;p&gt;self.config_db.set_lasterror_options(fsync=True)&lt;br/&gt;
self.config_db.settings.update(&lt;/p&gt;
{ &apos;_id&apos; : &quot;balancer&quot; }
&lt;p&gt;, { &apos;$set&apos; : &lt;/p&gt;
{ &apos;stopped&apos; : True}
&lt;p&gt; }, True, False, True)&lt;/p&gt;

&lt;p&gt;About 30% of the time, the following exception is thrown:&lt;/p&gt;

&lt;p&gt;06:41:18  Traceback (most recent call last):&lt;br/&gt;
06:41:18    File &quot;/opt/XXXX/bin/mongo.backup.py&quot;, line 398, in &amp;lt;module&amp;gt;&lt;br/&gt;
06:41:18      balancer.disableBalancer()&lt;br/&gt;
06:41:18    File &quot;/opt/XXXX/bin/mongo.backup.py&quot;, line 47, in disableBalancer&lt;br/&gt;
06:41:18      self.__setBalancer (True)&lt;br/&gt;
06:41:18    File &quot;/opt/XXXX/bin/mongo.backup.py&quot;, line 43, in __setBalancer&lt;br/&gt;
06:41:18      self.config_db.settings.update(&lt;/p&gt;
{ &apos;_id&apos; : &quot;balancer&quot; }
&lt;p&gt;, { &apos;$set&apos; : &lt;/p&gt;
{ &apos;stopped&apos; : bol }
&lt;p&gt; }, True, False, True)&lt;br/&gt;
06:41:18    File &quot;/usr/lib64/python2.6/site-packages/pymongo/collection.py&quot;, line 411, in update&lt;br/&gt;
06:41:18      &lt;em&gt;check_keys, self.&lt;/em&gt;_uuid_subtype), safe)&lt;br/&gt;
06:41:18    File &quot;/usr/lib64/python2.6/site-packages/pymongo/connection.py&quot;, line 831, in _send_message&lt;br/&gt;
06:41:18      rv = self.__check_response_to_last_error(response)&lt;br/&gt;
06:41:18    File &quot;/usr/lib64/python2.6/site-packages/pymongo/connection.py&quot;, line 778, in __check_response_to_last_error&lt;br/&gt;
06:41:18      raise DuplicateKeyError(details&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;err&amp;quot;&amp;#93;&lt;/span&gt;)&lt;br/&gt;
06:41:18  pymongo.errors.DuplicateKeyError: E11000 duplicate key error index: XXXX.m_generics.$&lt;em&gt;id&lt;/em&gt;  dup key: { : &quot;11f1952c-55b0-474b-950e-f03c54d538b5&quot; }&lt;/p&gt;


&lt;p&gt;After a few attempts, the script succeeds in disabling the balancer.&lt;br/&gt;
Any ideas of how to handle this? Does this point to a bigger issue (are there really duplicate keys somehow?)&lt;/p&gt;
</description>
                <environment>Linux 64-bit&lt;br/&gt;
2 shards of 3 servers each ( Primary/Secondary/Arbiter )&lt;br/&gt;
</environment>
        <key id="58802">SERVER-7888</key>
            <summary> E11000 duplicate key error index while stopping the Balancer</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="4">Incomplete</resolution>
                                        <assignee username="david.hows">David Hows</assignee>
                                    <reporter username="tewner">Michael Tewner</reporter>
                        <labels>
                            <label>DuplicateKey</label>
                            <label>balancer</label>
                    </labels>
                <created>Mon, 10 Dec 2012 07:02:25 +0000</created>
                <updated>Fri, 8 Mar 2013 15:55:20 +0000</updated>
                            <resolved>Sun, 24 Feb 2013 23:16:09 +0000</resolved>
                                    <version>2.0.8</version>
                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="217903" author="david.hows" created="Tue, 18 Dec 2012 03:01:01 +0000"  >&lt;p&gt;Hi Michael,&lt;/p&gt;

&lt;p&gt;Given what you have said I would suspect &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4532&quot; title=&quot;GetLastError on sharded cluster can report incorrect result &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4532&quot;&gt;&lt;del&gt;SERVER-4532&lt;/del&gt;&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Especially given that the error is from an unrelated collection &lt;tt&gt;Database.m_sequences&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Can you upload the mongos logs and if possible the logs of both primaries? I would like to try and confirm that this is the case.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;

&lt;p&gt;David&lt;/p&gt;</comment>
                            <comment id="217284" author="tewner" created="Mon, 17 Dec 2012 15:30:05 +0000"  >&lt;p&gt;I should add, though, that I was mistaken - The environment is made up of 2 shards of replica sets, but each replica set only has a Primary node. Could that be relevant?&lt;/p&gt;</comment>
                            <comment id="216386" author="tewner" created="Sun, 16 Dec 2012 12:55:34 +0000"  >&lt;p&gt;Is it possible that I&apos;m getting  &lt;/p&gt;
{ &apos;err&apos;: None }
&lt;p&gt; ?&lt;br/&gt;
i&apos;m not sure this is the output you&apos;re looking for. How do get the required info using PyMongo?&lt;/p&gt;

&lt;p&gt;11:34:20  &lt;/p&gt;
{u&apos;ok&apos;: 1.0, u&apos;err&apos;: None, u&apos;singleShard&apos;: u&apos;devshare01srv02:20001,devshare02srv02:20001,devshare04:20001&apos;, u&apos;connectionId&apos;: 11942, u&apos;n&apos;: 1, u&apos;updatedExisting&apos;: True, u&apos;waited&apos;: 13}
&lt;p&gt;11:34:20  Traceback (most recent call last):&lt;br/&gt;
11:34:20    File &quot;/opt/XXXX/bin/mongo.backup.py&quot;, line 400, in &amp;lt;module&amp;gt;&lt;br/&gt;
11:34:20      balancer.disableBalancer()&lt;br/&gt;
11:34:20    File &quot;/opt/XXXX/bin/mongo.backup.py&quot;, line 49, in disableBalancer&lt;br/&gt;
11:34:20      self.__setBalancer (True)&lt;br/&gt;
11:34:20    File &quot;/opt/XXXX/bin/mongo.backup.py&quot;, line 43, in __setBalancer&lt;br/&gt;
11:34:20      result = self.config_db.settings.update(&lt;/p&gt;
{ &apos;_id&apos; : &quot;balancer&quot; }
&lt;p&gt;, { &apos;$set&apos; : &lt;/p&gt;
{ &apos;stopped&apos; : bol }
&lt;p&gt; }, True, False, True)&lt;br/&gt;
11:34:20    File &quot;/usr/lib64/python2.6/site-packages/pymongo/collection.py&quot;, line 411, in update&lt;br/&gt;
11:34:20      &lt;em&gt;check_keys, self.&lt;/em&gt;_uuid_subtype), safe)&lt;br/&gt;
11:34:20    File &quot;/usr/lib64/python2.6/site-packages/pymongo/connection.py&quot;, line 831, in _send_message&lt;br/&gt;
11:34:20      rv = self.__check_response_to_last_error(response)&lt;br/&gt;
11:34:20    File &quot;/usr/lib64/python2.6/site-packages/pymongo/connection.py&quot;, line 778, in __check_response_to_last_error&lt;br/&gt;
11:34:20      raise DuplicateKeyError(details&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;err&amp;quot;&amp;#93;&lt;/span&gt;)&lt;br/&gt;
11:34:20  pymongo.errors.DuplicateKeyError: E11000 duplicate key error index: Database.m_sequences.$&lt;em&gt;id&lt;/em&gt;  dup key: { : &quot;SHARED_CONTENT&quot; }&lt;/p&gt;</comment>
                            <comment id="214762" author="david.hows" created="Fri, 14 Dec 2012 07:39:45 +0000"  >&lt;p&gt;Hi Michael,&lt;/p&gt;

&lt;p&gt;Would you be able to output the whole structure of the getLastError object and attach to the ticket?&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;

&lt;p&gt;David&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="26975">SERVER-4532</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="22628" name="mongos.log" size="17207" author="tewner" created="Tue, 18 Dec 2012 08:34:10 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 14 Dec 2012 07:39:45 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 9 weeks, 2 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="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.hows</customfieldvalue>
            <customfieldvalue>tewner</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnf2v:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>36247</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_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|ht0647:</customfieldvalue>

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