<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:48 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>[JAVA-1103] CommandResult.getException not detecting &quot;caused by&quot; duplicate key exception</title>
                <link>https://jira.mongodb.org/browse/JAVA-1103</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;An exception will not get converted to the expected type if a duplicate key error is the underlying error:&lt;/p&gt;

&lt;p&gt;(hosts/ips/oids changed)&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;   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; com.mongodb.WriteConcernException: { &quot;serverUsed&quot; : &quot;mongosA/1.2.3.4:27017&quot; ,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;err&quot; : &quot;error inserting 1 documents to shard shard0001:feeds1/fs1:27017,fs2:27017,fs3:27017,fs4:27017,fs5:27017 at version 37|1||52a65f219cdffac001be7e80 :: caused by :: E11000 duplicate key error index: foursquare.collA.$id  dup key: { : { t: \&quot;s\&quot;, o: ObjectId(&apos;xyz&apos;), v: ObjectId(&apos;abc&apos;) } }&quot; ,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;code&quot; : 16460 , &quot;n&quot; : 0 , &quot;ok&quot; : 1.0}&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;I believe this happens when the mongos adds the duplicate key error as a &quot;caused by&quot; error.&lt;/p&gt;</description>
                <environment>Java Driver 2.11.3, Mongos + Mongo 2.4.8</environment>
        <key id="108994">JAVA-1103</key>
            <summary>CommandResult.getException not detecting &quot;caused by&quot; duplicate key exception</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="slackhappy">John Gallagher</reporter>
                        <labels>
                    </labels>
                <created>Fri, 31 Jan 2014 20:26:15 +0000</created>
                <updated>Fri, 30 Jan 2015 18:43:55 +0000</updated>
                            <resolved>Fri, 17 Oct 2014 12:54:25 +0000</resolved>
                                    <version>2.11.3</version>
                                    <fixVersion>2.13.0</fixVersion>
                    <fixVersion>3.0.0</fixVersion>
                                    <component>Error Handling</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="817953" author="xgen-internal-githook" created="Fri, 30 Jan 2015 18:43:55 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Support sharded DuplicateKey exceptions&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1103&quot; title=&quot;CommandResult.getException not detecting &amp;quot;caused by&amp;quot; duplicate key exception&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1103&quot;&gt;&lt;del&gt;JAVA-1103&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/8b55e446b63e3662094e772471c17c49ae9d1cc3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/8b55e446b63e3662094e772471c17c49ae9d1cc3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="744015" author="xgen-internal-githook" created="Fri, 17 Oct 2014 12:52:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Support sharded DuplicateKey exceptions&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1103&quot; title=&quot;CommandResult.getException not detecting &amp;quot;caused by&amp;quot; duplicate key exception&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1103&quot;&gt;&lt;del&gt;JAVA-1103&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: 3.0.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/8b55e446b63e3662094e772471c17c49ae9d1cc3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/8b55e446b63e3662094e772471c17c49ae9d1cc3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="744013" author="xgen-internal-githook" created="Fri, 17 Oct 2014 12:48:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Support sharded DuplicateKey exceptions&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1103&quot; title=&quot;CommandResult.getException not detecting &amp;quot;caused by&amp;quot; duplicate key exception&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1103&quot;&gt;&lt;del&gt;JAVA-1103&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/cff488446ee77edd50cad0b6edc1f204c4145b21&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/cff488446ee77edd50cad0b6edc1f204c4145b21&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="652968" author="ross@10gen.com" created="Wed, 9 Jul 2014 13:52:15 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=hoffrocket&quot; class=&quot;user-hover&quot; rel=&quot;hoffrocket&quot;&gt;hoffrocket&lt;/a&gt; for the Pull request - we will review in due course&lt;/p&gt;</comment>
                            <comment id="652134" author="hoffrocket" created="Tue, 8 Jul 2014 20:05:04 +0000"  >&lt;p&gt;This is still a problem in 2.12.2 on mongoS 2.4.9. Created a pull request to fix. &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/pull/225&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/pull/225&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can duplicate the problem using the test project here: &lt;a href=&quot;https://github.com/hoffrocket/mongo-dup-key&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/hoffrocket/mongo-dup-key&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="491735" author="slackhappy" created="Fri, 31 Jan 2014 20:27:44 +0000"  >&lt;p&gt;Related: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1081&quot; title=&quot;CommandResult.getException not detecting duplicate key errors reported in errObjects field&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1081&quot;&gt;&lt;del&gt;JAVA-1081&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="96493">SERVER-11493</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="96114">PYTHON-592</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="106323">JAVA-1081</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrg9lr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8461</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="264">Java Sprint 7</customfieldvalue>
    <customfieldvalue id="298">Java Sprint 9</customfieldvalue>

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