<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56:47 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-1356] Positional operator on update: command accepted without error, but data not updated.</title>
                <link>https://jira.mongodb.org/browse/SERVER-1356</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;testupdate3 did not exist at the beginning of this test.&lt;/p&gt;

&lt;p&gt;&amp;gt; db.testupdate3.ensureIndex(&lt;/p&gt;
{&apos;y.a&apos;:1,&apos;y.b&apos;:1}
&lt;p&gt;)                          &lt;br/&gt;
&amp;gt; db.testupdate3.save({x:1,y:[&lt;/p&gt;
{a:1,b:2}
&lt;p&gt;,&lt;/p&gt;
{a:3,b:4}
&lt;p&gt;]})                     &lt;/p&gt;

&lt;p&gt;&amp;gt; db.testupdate3.update(&lt;/p&gt;
{&apos;y.a&apos;:3,&apos;y.b&apos;:4}
&lt;p&gt;,{$set:{&apos;y.$.b&apos;:10}},false,true)&lt;br/&gt;
can&apos;t append to array using string field name&lt;br/&gt;
&amp;gt; db.testupdate3.update(&lt;/p&gt;
{&apos;y.a&apos;:3,&apos;y.b&apos;:4,x:1}
&lt;p&gt;,{$set:{&apos;y.$.b&apos;:10}},false,true)&lt;br/&gt;
&amp;gt; db.testupdate2.find(&lt;/p&gt;
{&apos;y.a&apos;:3,&apos;y.b&apos;:10}
&lt;p&gt;)                                    &lt;br/&gt;
{ &quot;_id&quot; : ObjectId(&quot;4c2f5c449a684ff16748c1cf&quot;), &quot;x&quot; : 1, &quot;y&quot; : [ &lt;/p&gt;
{ &quot;a&quot; : 1, &quot;b&quot; : 2 }
&lt;p&gt;, &lt;/p&gt;
{ &quot;a&quot; : 3, &quot;b&quot; : 10 }
&lt;p&gt; ] }&lt;br/&gt;
&amp;gt; db.testupdate3.update(&lt;/p&gt;
{&apos;y.a&apos;:3,&apos;y.b&apos;:10,x:1}
&lt;p&gt;,{$set:{&apos;y.$.b&apos;:4}},false,true) &lt;br/&gt;
&amp;gt; db.testupdate3.find()                                                      &lt;br/&gt;
{ &quot;_id&quot; : ObjectId(&quot;4c2f5d749a684ff16748c1d2&quot;), &quot;x&quot; : 1, &quot;y&quot; : [ &lt;/p&gt;
{ &quot;a&quot; : 1, &quot;b&quot; : 2 }
&lt;p&gt;, &lt;/p&gt;
{ &quot;a&quot; : 3, &quot;b&quot; : 10 }
&lt;p&gt; ] }&lt;/p&gt;

&lt;p&gt;Notice that the update fails, as in issue &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1040&quot; title=&quot;positional operator and $set with an indexed field, update fails with error: can&amp;#39;t append to array using string field name&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1040&quot;&gt;&lt;del&gt;SERVER-1040&lt;/del&gt;&lt;/a&gt;, if we don&apos;t also include an additional restriction x:1 in the search.&lt;/p&gt;

&lt;p&gt;As an additional twist, I haven&apos;t been able to make a test case for this, but in our test environment, the above sequence DID (essentially) update b back to 4 in the second update. While the data was visible if you queried on (essentially) x, if you tried to query on y.a and y.b, it did NOT find the changed records, nor did it find if it you queried on your previous values of y. &lt;/p&gt;

&lt;p&gt;Is an index perhaps getting corrupted?&lt;/p&gt;</description>
                <environment>Linux</environment>
        <key id="12339">SERVER-1356</key>
            <summary>Positional operator on update: command accepted without error, but data not updated.</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="dakarp">Daniel Karp</reporter>
                        <labels>
                    </labels>
                <created>Sat, 3 Jul 2010 12:19:08 +0000</created>
                <updated>Wed, 8 Feb 2023 13:31:03 +0000</updated>
                            <resolved>Sun, 4 Jul 2010 08:43:22 +0000</resolved>
                                    <version>1.4.4</version>
                                    <fixVersion>1.5.4</fixVersion>
                                    <component>Write Ops</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="15385" author="eliot" created="Sun, 4 Jul 2010 08:43:22 +0000"  >&lt;p&gt;This was fixed at some point in the 1.5 series&lt;/p&gt;</comment>
                            <comment id="15384" author="eliot" created="Sun, 4 Jul 2010 08:42:39 +0000"  >&lt;p&gt;What version are you using?&lt;br/&gt;
in 1.5.4 this is working for me.&lt;/p&gt;</comment>
                    </comments>
                    <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>Sun, 4 Jul 2010 08:42:39 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 33 weeks, 3 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="10020"><![CDATA[Linux]]></customfieldvalue>

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

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

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

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