<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:59:15 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-2198] getlasterror works oddly with sharding</title>
                <link>https://jira.mongodb.org/browse/SERVER-2198</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The PHP remove() method set with safe =&amp;gt; true is returning instantly and not outputting any count for the removed docs even though I can see the remove op in db.currentOp()&lt;/p&gt;

&lt;p&gt;try&lt;br/&gt;
{&lt;br/&gt;
	$DBMongoConn = new Mongo($config&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;database&amp;#39;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;mongodb&amp;#39;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;server&amp;#39;&amp;#93;&lt;/span&gt;);&lt;br/&gt;
}&lt;br/&gt;
catch (Exception $e)&lt;br/&gt;
{&lt;br/&gt;
	throw new Exception(&apos;MongoDB Error: connection failed: &apos; . $e-&amp;gt;getMessage());&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;$collection = $sdDb-&amp;gt;selectCollection(&apos;metrics&apos;);		&lt;/p&gt;

&lt;p&gt;try&lt;br/&gt;
{&lt;br/&gt;
	$result = $collection-&amp;gt;remove(array(&apos;accId&apos; =&amp;gt; $account&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;accountId&amp;#39;&amp;#93;&lt;/span&gt;, &apos;tA&apos; =&amp;gt; array(&apos;$lte&apos; =&amp;gt; $deleteTime)), array(&apos;safe&apos; =&amp;gt; true));&lt;br/&gt;
}&lt;br/&gt;
catch (Exception $e)&lt;br/&gt;
{	&lt;br/&gt;
	die(&apos;Query failed (&apos; . _&lt;em&gt;LINE&lt;/em&gt;_ . &apos;): &apos; . $e-&amp;gt;getMessage() . &quot;\n&quot;);&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;$error = $sdDb-&amp;gt;lastError();&lt;/p&gt;

&lt;p&gt;&amp;#8212;&lt;/p&gt;

&lt;p&gt;$account&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;accountId&amp;#39;&amp;#93;&lt;/span&gt; = int&lt;br/&gt;
$deleteTime = MongoDate&lt;/p&gt;

&lt;p&gt;&amp;#8212;&lt;/p&gt;

&lt;p&gt;$error&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;err&amp;#39;&amp;#93;&lt;/span&gt; is null&lt;br/&gt;
$result&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;n&amp;#39;&amp;#93;&lt;/span&gt; is 0&lt;/p&gt;

&lt;p&gt;db.currentOp()&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
			&quot;opid&quot; : &quot;shard1:418732718&quot;,&lt;br/&gt;
			&quot;active&quot; : true,&lt;br/&gt;
			&quot;lockType&quot; : &quot;write&quot;,&lt;br/&gt;
			&quot;waitingForLock&quot; : false,&lt;br/&gt;
			&quot;secs_running&quot; : 124,&lt;br/&gt;
			&quot;op&quot; : &quot;remove&quot;,&lt;br/&gt;
			&quot;ns&quot; : &quot;sd.processes&quot;,&lt;br/&gt;
			&quot;query&quot; : {&lt;br/&gt;
				&quot;accId&quot; : 1,&lt;br/&gt;
				&quot;tA&quot; : &lt;/p&gt;
{
					&quot;$lte&quot; : ISODate(&quot;2010-12-02T09:16:15Z&quot;)
				}
&lt;p&gt;			},&lt;br/&gt;
			&quot;client&quot; : &quot;10.121.12.228:33739&quot;,&lt;br/&gt;
			&quot;desc&quot; : &quot;conn&quot;&lt;br/&gt;
		},&lt;/p&gt;</description>
                <environment>mongos:&lt;br/&gt;
&lt;br/&gt;
Wed Dec  1 16:30:37 /home/david/mongodb/latest/bin/mongos db version v1.7.2-pre-, pdfile version 4.5 starting (--help for usage)&lt;br/&gt;
Wed Dec  1 16:30:37 git version: 876dae7981e1ec1141fd1b155429274b83a1f99c&lt;br/&gt;
Wed Dec  1 16:30:37 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41&lt;br/&gt;
&lt;br/&gt;
mongod:&lt;br/&gt;
&lt;br/&gt;
Wed Nov 10 06:55:56 db version v1.7.3-pre-, pdfile version 4.5&lt;br/&gt;
Wed Nov 10 06:55:56 git version: 0ca797e907c62a174a90f48954bb55c09a1ee475&lt;br/&gt;
Wed Nov 10 06:55:56 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41&lt;br/&gt;
&lt;br/&gt;
PHP Version 5.3.3&lt;br/&gt;
mongo driver 1.0.11</environment>
        <key id="13910">SERVER-2198</key>
            <summary>getlasterror works oddly with sharding</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="3">Duplicate</resolution>
                                        <assignee username="kristina">Kristina Chodorow</assignee>
                                    <reporter username="boxedice">David Mytton</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 Dec 2010 09:25:24 +0000</created>
                <updated>Fri, 4 Feb 2011 03:09:05 +0000</updated>
                            <resolved>Fri, 4 Feb 2011 03:09:05 +0000</resolved>
                                                                    <component>Sharding</component>
                                        <votes>2</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="23098" author="eliot" created="Fri, 4 Feb 2011 03:09:05 +0000"  >&lt;p&gt;There were a ton of fixed to getLastError in 1.7.4 and 1.7.5.&lt;br/&gt;
This should be fixed.&lt;/p&gt;</comment>
                            <comment id="21256" author="kristina" created="Thu, 9 Dec 2010 20:28:01 +0000"  >&lt;p&gt;e.g., removing two elements through mongos:&lt;/p&gt;

&lt;p&gt;&amp;gt; db1.foo.bar.count()&lt;br/&gt;
2&lt;br/&gt;
&amp;gt; db1.foo.bar.remove()&lt;br/&gt;
&amp;gt; db1.runCommand(&lt;/p&gt;
{getlasterror:1}
&lt;p&gt;)&lt;br/&gt;
{&lt;br/&gt;
        &quot;err&quot; : &quot;unrecognized command: replSetGetStatus&quot;,&lt;br/&gt;
        &quot;code&quot; : 13390,&lt;br/&gt;
        &quot;n&quot; : 0,&lt;br/&gt;
        &quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 9 Dec 2010 20:28:01 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 2 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>boxedice</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>kristina</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpafz:</customfieldvalue>

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

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

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