<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:21 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-464] driver does not properly recognize certain command errors</title>
                <link>https://jira.mongodb.org/browse/JAVA-464</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;when calling a command, driver checks for error using the &quot;err&quot; field.&lt;br/&gt;
But that field is not always specified, sometimes it&apos;s &quot;errmsg&quot;.&lt;br/&gt;
Apparently there is a known distinction between the 2.&lt;/p&gt;

&lt;p&gt;For example, when using an unknown &quot;w&quot; policy:&lt;br/&gt;
{ &quot;serverUsed&quot; : &quot;localhost:27017&quot; , &quot;n&quot; : 0 , &quot;lastOp&quot; : &lt;/p&gt;
{ &quot;$ts&quot; : 1319852070 , &quot;$inc&quot; : 1}
&lt;p&gt; , &quot;connectionId&quot; : 82 , &quot;errmsg&quot; : &quot;exception: unrecognized getLastError mode: blah&quot; , &quot;code&quot; : 14830 , &quot;ok&quot; : 0.0} in 3ms&lt;/p&gt;

&lt;p&gt;looks like driver should instead rely on ok=0 and then look for either err or errmsg.&lt;/p&gt;</description>
                <environment></environment>
        <key id="24315">JAVA-464</key>
            <summary>driver does not properly recognize certain command errors</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="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="antoine">Antoine Girbal</reporter>
                        <labels>
                    </labels>
                <created>Mon, 31 Oct 2011 21:42:28 +0000</created>
                <updated>Mon, 10 Dec 2012 15:27:19 +0000</updated>
                            <resolved>Fri, 13 Jul 2012 19:54:50 +0000</resolved>
                                                    <fixVersion>2.9.0</fixVersion>
                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="211087" author="ticoli" created="Mon, 10 Dec 2012 15:27:19 +0000"  >&lt;p&gt;Thank you! You make my day!&lt;br/&gt;
I was doing the init in a spring xml file with value=&quot;1&quot;. Replaced by =&quot;SAFE&quot; and that&apos;s it!&lt;/p&gt;</comment>
                            <comment id="211060" author="jeff.yemin" created="Mon, 10 Dec 2012 14:40:10 +0000"  >&lt;p&gt;What WriteConcern are you using?  If you&apos;re doing something like:&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;  new WriteConcern(&quot;1&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;

&lt;p&gt;then that would trigger this error.  Make sure you&apos;re using the integer 1 and not the String &quot;1&quot;. &lt;/p&gt;</comment>
                            <comment id="210985" author="ticoli" created="Mon, 10 Dec 2012 12:51:36 +0000"  >&lt;p&gt;I&apos;m using mongodb 2.2.2 (debian 64bit), spring-data-mongo 1.1.1-Release and java mongo drivers 2.9.3.&lt;br/&gt;
It works fine with spring-data-mongo-1.0.1-Release and java mongo drivers 2.7.3, but i need 2.2 features (near ReadPreferences).&lt;/p&gt;

&lt;p&gt;I&apos;ve got a similar message :&lt;/p&gt;

&lt;p&gt;error command failed &lt;span class=&quot;error&quot;&gt;&amp;#91;getlasterror&amp;#93;&lt;/span&gt;: { &quot;serverUsed&quot; : &quot;localhost/127.0.0.1:27017&quot; , &quot;n&quot; : 0 , &quot;lastOp&quot; : &lt;/p&gt;
{ &quot;$ts&quot; : 1355143187 , &quot;$inc&quot; : 1}
&lt;p&gt; , &quot;connectionId&quot; : 49 , &quot;errmsg&quot; : &quot;exception: unrecognized getLastError mode: 1&quot; , &quot;code&quot; : 14830 , &quot;ok&quot; : 0.0}&lt;/p&gt;

&lt;p&gt;Any advice?&lt;/p&gt;</comment>
                            <comment id="158217" author="jeff.yemin" created="Wed, 29 Aug 2012 20:08:05 +0000"  >&lt;p&gt;Closing as part of 2.9.0 release process.&lt;/p&gt;</comment>
                            <comment id="142887" author="jeff.yemin" created="Fri, 13 Jul 2012 19:54:06 +0000"  >&lt;p&gt;Tracked this down finally.  I had fixed it as a side effect of this commit:&lt;/p&gt;

&lt;p&gt;Message: refactored com.mongodb.DBTCPConnector#_checkWriteError to make intent clearer.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/3d5458e5fbbedd2381f3c675fc140eae94ea2949&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/3d5458e5fbbedd2381f3c675fc140eae94ea2949&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="125670" author="jeff.yemin" created="Mon, 4 Jun 2012 13:59:26 +0000"  >&lt;p&gt;That change was done in scope of &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-292&quot; title=&quot;writeResult.getLastError().throwOnError() does not throw MongoException.DuplicateKey on duplicate key error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-292&quot;&gt;&lt;del&gt;JAVA-292&lt;/del&gt;&lt;/a&gt; according to git.&lt;/p&gt;</comment>
                            <comment id="125572" author="antoine" created="Mon, 4 Jun 2012 02:32:22 +0000"  >&lt;p&gt;restoring original title&lt;/p&gt;</comment>
                            <comment id="121883" author="jeff.yemin" created="Tue, 22 May 2012 14:29:59 +0000"  >&lt;p&gt;Pushing this to 2.9.0.&lt;/p&gt;</comment>
                            <comment id="115726" author="jeff.yemin" created="Wed, 2 May 2012 19:45:37 +0000"  >&lt;p&gt;&quot;errmsg&quot; is for command failures&lt;/p&gt;</comment>
                            <comment id="99670" author="jeff.yemin" created="Fri, 16 Mar 2012 18:28:44 +0000"  >&lt;p&gt;Antoine, any idea what the known distinction is between the 2?  Should the driver treat &quot;err&quot; and &quot;errmsg&quot; differently?&lt;/p&gt;</comment>
                    </comments>
                    <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|hrghin:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9776</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>