<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:13:05 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-6909] verify assertion when new version of a document is requested that does not match dotted field expression of original query; excessive logging</title>
                <link>https://jira.mongodb.org/browse/SERVER-6909</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The update version of findAndModify attempts to find the new version of a document using a modified version of the original query (queryModified).  A dotted field expression may be copied from the original query to queryModified, but if that field is changed by the update the constraint on that field may cause the match to fail and prevent the new version of the document from being found.  (And this causes the verify to fire.)&lt;/p&gt;

&lt;p&gt;Test&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;c = db.c;&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;c.drop();&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;&amp;nbsp;&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;c.save( { a:{ b:1 } } );&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;c.findAndModify( { query:{ &apos;a.b&apos;:1 },&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;                   update:{ $set:{ &apos;a.b&apos;:2 } }, // Ensure the query on &apos;a.b&apos; no longer matches.          &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;                   new:true } );&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;It also looks like there is a debugging log line in the code:&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;log() &amp;lt;&amp;lt; &quot;queryModified: &quot; &amp;lt;&amp;lt; queryModified &amp;lt;&amp;lt; endl;&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;&amp;#8211; Aaron&lt;/p&gt;

&lt;p&gt;-----------------------------------------------&lt;/p&gt;

&lt;p&gt;My logs are filled with the following:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;conn&amp;lt;X&amp;gt;&amp;#93;&lt;/span&gt; queryModified: &lt;/p&gt;
{ _id: &amp;lt;any id&amp;gt; }
&lt;p&gt;And, occasionally:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;conn&amp;lt;M&amp;gt;&amp;#93;&lt;/span&gt; queryModified: { _id: &amp;lt;id&amp;gt;, $atomic: true, f.o: &lt;/p&gt;
{ $exists: false }
&lt;p&gt; }&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;conn&amp;lt;N&amp;gt;&amp;#93;&lt;/span&gt;  &amp;lt;collection&amp;gt; Assertion failure Helpers::findOne( ns.c_str() , queryModified , doc ) src/mongo/db/commands/find_and_modify.cpp 184&lt;/p&gt;

&lt;p&gt;The resulting error is: exception: assertion src/mongo/db/commands/find_and_modify.cpp:184 (response: &lt;/p&gt;
{ &quot;errmsg&quot; : &quot;exception: assertion src/mongo/db/commands/find_and_modify.cpp:184&quot;, &quot;code&quot; : 0, &quot;ok&quot; : 0.0 }
&lt;p&gt;)&lt;/p&gt;</description>
                <environment></environment>
        <key id="48991">SERVER-6909</key>
            <summary>verify assertion when new version of a document is requested that does not match dotted field expression of original query; excessive logging</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="onyxmaster">Aristarkh Zagorodnikov</reporter>
                        <labels>
                    </labels>
                <created>Fri, 31 Aug 2012 13:53:00 +0000</created>
                <updated>Mon, 11 Jul 2016 17:59:30 +0000</updated>
                            <resolved>Tue, 18 Sep 2012 06:09:10 +0000</resolved>
                                    <version>2.2.0</version>
                                    <fixVersion>2.2.1</fixVersion>
                    <fixVersion>2.3.0</fixVersion>
                                    <component>Write Ops</component>
                                        <votes>4</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="165780" author="auto" created="Tue, 18 Sep 2012 23:08:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-17T23:08:03-07:00&apos;, u&apos;email&apos;: u&apos;eliot@10gen.com&apos;, u&apos;name&apos;: u&apos;Eliot Horowitz&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6909&quot; title=&quot;verify assertion when new version of a document is requested that does not match dotted field expression of original query; excessive logging&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6909&quot;&gt;&lt;del&gt;SERVER-6909&lt;/del&gt;&lt;/a&gt; fix case where update can modify document such that query doesn&apos;t work anymore&lt;br/&gt;
Branch: v2.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/414a7dc114f34a341c8b4907a4e24760b449e724&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/414a7dc114f34a341c8b4907a4e24760b449e724&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="165367" author="auto" created="Tue, 18 Sep 2012 06:09:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-17T23:08:03-07:00&apos;, u&apos;email&apos;: u&apos;eliot@10gen.com&apos;, u&apos;name&apos;: u&apos;Eliot Horowitz&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6909&quot; title=&quot;verify assertion when new version of a document is requested that does not match dotted field expression of original query; excessive logging&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6909&quot;&gt;&lt;del&gt;SERVER-6909&lt;/del&gt;&lt;/a&gt; fix case where update can modify document such that query doesn&apos;t work anymore&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e398691aec2a351426366cf3bc1e10cfcd05ea16&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e398691aec2a351426366cf3bc1e10cfcd05ea16&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="161978" author="onyxmaster" created="Sat, 8 Sep 2012 18:45:45 +0000"  >&lt;p&gt;Backport sounds great, because we like everything about 2.2.&lt;/p&gt;</comment>
                            <comment id="161932" author="ian@10gen.com" created="Sat, 8 Sep 2012 14:26:58 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=onyxmaster&quot; class=&quot;user-hover&quot; rel=&quot;onyxmaster&quot;&gt;onyxmaster&lt;/a&gt; - keep an eye on this ticket as there&apos;s a chance it will also be backported to a 2.2.x release (pending review by our team)&lt;/p&gt;</comment>
                            <comment id="161894" author="onyxmaster" created="Sat, 8 Sep 2012 07:31:21 +0000"  >&lt;p&gt;Well, looks like we&apos;re sticking with 2.0 until 2.4 comes.&lt;/p&gt;</comment>
                            <comment id="161826" author="ian@10gen.com" created="Fri, 7 Sep 2012 22:16:24 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=onyxmaster&quot; class=&quot;user-hover&quot; rel=&quot;onyxmaster&quot;&gt;onyxmaster&lt;/a&gt;, we haven&apos;t solidified what&apos;s in/out yet, but the plan is indeed to fix for the 2.4.0 stable release.&lt;/p&gt;</comment>
                            <comment id="161566" author="shinderuk" created="Fri, 7 Sep 2012 09:32:53 +0000"  >&lt;p&gt;One more test case (without a dotted expression):&lt;/p&gt;

&lt;p&gt;&amp;gt; db.c.remove()&lt;br/&gt;
&amp;gt; db.c.findAndModify({ query: {_id: 1, x: 0}, update: { $set: &lt;/p&gt;
{x: 1}
&lt;p&gt; }, new: true, upsert: true })&lt;br/&gt;
Fri Sep  7 13:19:18 uncaught exception: findAndModifyFailed failed: {&lt;br/&gt;
	&quot;errmsg&quot; : &quot;exception: assertion src/mongo/db/commands/find_and_modify.cpp:184&quot;,&lt;br/&gt;
	&quot;code&quot; : 0,&lt;br/&gt;
	&quot;ok&quot; : 0&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="159641" author="onyxmaster" created="Sat, 1 Sep 2012 05:30:04 +0000"  >&lt;p&gt;Thanks for the information.&lt;br/&gt;
Is this still considered a bug, so we should wait for 2.4 (Fix Version/s 2.3.x imply that), or an &lt;span class=&quot;error&quot;&gt;&amp;#91;undocumented&amp;#93;&lt;/span&gt; breaking change, so we should either rewrite our applications or stick with 2.0 forever?&lt;/p&gt;</comment>
                            <comment id="159294" author="onyxmaster" created="Fri, 31 Aug 2012 14:10:27 +0000"  >&lt;p&gt;The entire contents of one of our master 2.2 upgrade attempt.&lt;/p&gt;</comment>
                            <comment id="159275" author="scotthernandez" created="Fri, 31 Aug 2012 13:56:41 +0000"  >&lt;p&gt;Please attach a large section of your log.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="49093">SERVER-6913</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="19366" name="mdb.log.gz" size="411883" author="onyxmaster" created="Fri, 31 Aug 2012 14:10:27 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 31 Aug 2012 13:56:41 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 22 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/CS-4553'>CS-4553</a></s>]]></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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 22 weeks, 1 day ago
                        </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>onyxmaster</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
            <customfieldvalue>shinderuk</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnq7z:</customfieldvalue>

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

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

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