<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:22:57 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-10354] db.getLastError() always returns null when using autocomplete</title>
                <link>https://jira.mongodb.org/browse/SERVER-10354</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I use Mongodb 2.4.5 for windows(32bit).  The db.getLastError() always returns null even if an error occurs, but only when using auto-complete for the &quot;getLastError&quot; call.&lt;/p&gt;</description>
                <environment></environment>
        <key id="83632">SERVER-10354</key>
            <summary>db.getLastError() always returns null when using autocomplete</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="backlog-server-platform">DO NOT USE - Backlog - Platform Team</assignee>
                                    <reporter username="andrewguo">Andrew Guo</reporter>
                        <labels>
                    </labels>
                <created>Fri, 26 Jul 2013 17:05:50 +0000</created>
                <updated>Fri, 2 Jun 2017 18:45:22 +0000</updated>
                            <resolved>Fri, 2 Jun 2017 18:45:22 +0000</resolved>
                                                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="1586261" author="acm" created="Fri, 2 Jun 2017 18:45:22 +0000"  >&lt;p&gt;Most uses of getLastError are now obviated by newer write mechanisms, so it does not make sense to invest effort in repairing this edge case. If this is still an issue in practice, avoid using tab completion.&lt;/p&gt;</comment>
                            <comment id="394480" author="eric.daniels@10gen.com" created="Fri, 2 Aug 2013 14:51:17 +0000"  >&lt;p&gt;This error is caused by using autocomplete on a DB object. Since &lt;tt&gt;getCollectionNames()&lt;/tt&gt; is called, it will set the last error to nothing if it succeeds which it does. The problem is storing the last error before calling this and then restoring it as there exists no way to do this currently. An alternative is to temporarily create a new connection for the autocomplete which will have its own getLastError context.&lt;/p&gt;</comment>
                            <comment id="394378" author="dan@10gen.com" created="Fri, 2 Aug 2013 12:13:08 +0000"  >&lt;p&gt;i&apos;m able to repro this on all versions and osx as well by using the autocomplete described by &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mirao&quot; class=&quot;user-hover&quot; rel=&quot;mirao&quot;&gt;mirao&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="389949" author="mirao" created="Sat, 27 Jul 2013 10:57:49 +0000"  >&lt;p&gt;The issue happens to me if I&apos;m using autocomplete in mongo shell&lt;/p&gt;

&lt;p&gt;Steps to reproduce:&lt;br/&gt;
&amp;gt; db.test.insert( &lt;/p&gt;
{ _id : 1, a : 1 }
&lt;p&gt; )&lt;br/&gt;
&amp;gt; db.test.insert( &lt;/p&gt;
{ _id : 1, a : 1 }
&lt;p&gt; )&lt;br/&gt;
E11000 duplicate key error index: test.test.$&lt;em&gt;id&lt;/em&gt;  dup key: { : 1.0 }&lt;/p&gt;

&lt;p&gt;Type the command db.getLastError(), do not use shell autocomplete:&lt;br/&gt;
&amp;gt; db.getLastError()&lt;br/&gt;
E11000 duplicate key error index: test.test.$&lt;em&gt;id&lt;/em&gt;  dup key: { : 1.0 }&lt;/p&gt;

&lt;p&gt;Type the command, use autocomplete:&lt;br/&gt;
&amp;gt; db.getL&lt;br/&gt;
press TAB + () + Enter&lt;/p&gt;

&lt;p&gt;Expected result:&lt;br/&gt;
&amp;gt; db.getLastError()&lt;br/&gt;
E11000 duplicate key error index: test.test.$&lt;em&gt;id&lt;/em&gt;  dup key: { : 1.0 }&lt;/p&gt;

&lt;p&gt;Actual result:&lt;br/&gt;
&amp;gt; db.getLastError()&lt;br/&gt;
null&lt;/p&gt;

&lt;p&gt;Used SW:&lt;br/&gt;
MongoDB 2.4.5, Ubuntu 13.04 x64&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="29264" name="m1.PNG" size="14221" author="andrewguo" created="Fri, 26 Jul 2013 17:05:50 +0000"/>
                            <attachment id="29265" name="m2.PNG" size="27819" author="andrewguo" created="Fri, 26 Jul 2013 17:05:50 +0000"/>
                            <attachment id="29266" name="mylog.txt" size="2654" author="andrewguo" created="Fri, 26 Jul 2013 17:05:50 +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_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 27 Jul 2013 10:57:49 +0000</customfieldvalue>

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

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrewguo</customfieldvalue>
            <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-platform</customfieldvalue>
            <customfieldvalue>eric.daniels@mongodb.com</customfieldvalue>
            <customfieldvalue>mirao</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmlcv:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6427</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;db.test.insert({_id:1})&lt;br/&gt;
db.test.insert({_id:1})&lt;br/&gt;
db.getLastError()&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|hspdxz:</customfieldvalue>

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