<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:21:44 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-72416] The find and findAndModify projection code does not honor the collection level collation</title>
                <link>https://jira.mongodb.org/browse/SERVER-72416</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;div class=&quot;panel&quot; style=&quot;background-color: #eeeeee;border-color: #cccccc;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-color: #cccccc;background-color: #6cb33f;&quot;&gt;&lt;b&gt;Issue Status as of May 16, 2023&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #eeeeee;&quot;&gt;
&lt;p&gt;&lt;b&gt;ISSUE DESCRIPTION AND AFFECTED VERSIONS&lt;/b&gt;&lt;br/&gt;
This bug impacts projections in find, findAndModify, and findOneAndDelete commands on &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/method/db.createCollection/#specify-collation&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;collections with a specified collation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When a collation on the collection level is specified, the find, findAndModify, and findOneAndDelete commands that use projection are affected by a bug that may cause MongoDB to crash after performing deletes without sending an acknowledgement to the user. This bug may also cause $sortArray in the projection to provide incorrect query results when sorting strings. &lt;/p&gt;

&lt;p&gt;Find commands that use projection use the ExpressionContext object, which does not inherit collection level collation. All expressions used inside of the projection command will use the default collation, unless explicitly specified.&lt;/p&gt;

&lt;p&gt;The find, findAndModify, findOneAndDelete commands are impacted when:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;The collection that is being queried against has collation specified,&lt;/li&gt;
	&lt;li&gt;No explicit collation is provided in the query,&lt;/li&gt;
	&lt;li&gt;It is using projection&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Meeting all of the requirements above, if the query uses $elemMatch with positional projection ($ operator) it will cause a server crash. The findAndModify with {remove: true} and findOneAndDelete command may crash after issuing deletes without sending an acknowledgement to the user.&lt;/p&gt;

&lt;p&gt;When the $sortArray is used in the projection, the find query will not use collection level collation, but will instead sort strings using a simple collation.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;DIAGNOSIS AND AFFECTED VERSIONS&lt;/b&gt;&lt;br/&gt;
This bug affects all versions of MongoDB v4.4, v5.0, and v6.0.0-v6.0.3.&lt;/p&gt;

&lt;p&gt;Nodes that hit this bug will crash with an invariant failure.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;REMEDIATION AND WORKAROUNDS&lt;/b&gt;&lt;br/&gt;
Users may workaround this issue by specifying a collation field in their queries which matches the collection&#8217;s specified collation.&lt;/p&gt;

&lt;p&gt;This issue is fixed in 6.0.4.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h6&gt;&lt;a name=&quot;OriginalDescription%3A&quot;&gt;&lt;/a&gt;Original Description:&lt;/h6&gt;
&lt;p&gt;The find projection parsing code uses a very naive &lt;tt&gt;ExpressionContext&lt;/tt&gt; object which does not inherit collection level collation. This means the expression evaluation code inside the projection spec does not use the collection level collation, leading to incorrect results.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2220745">SERVER-72416</key>
            <summary>The find and findAndModify projection code does not honor the collection level collation</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="13201">Fixed</resolution>
                                        <assignee username="arun.banala@mongodb.com">Arun Banala</assignee>
                                    <reporter username="arun.banala@mongodb.com">Arun Banala</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Dec 2022 19:17:38 +0000</created>
                <updated>Sun, 29 Oct 2023 21:28:50 +0000</updated>
                            <resolved>Fri, 6 Jan 2023 19:14:43 +0000</resolved>
                                    <version>4.4.18</version>
                    <version>5.0.14</version>
                    <version>6.0.3</version>
                                    <fixVersion>6.0.4</fixVersion>
                    <fixVersion>6.2.0-rc5</fixVersion>
                    <fixVersion>6.3.0-rc0</fixVersion>
                                                        <votes>3</votes>
                                    <watches>25</watches>
                                                                                                                <comments>
                            <comment id="5134472" author="xgen-internal-githook" created="Mon, 23 Jan 2023 21:02:35 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Arun Banala&apos;, &apos;email&apos;: &apos;arun.banala@mongodb.com&apos;, &apos;username&apos;: &apos;banarun&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72416&quot; title=&quot;The find and findAndModify projection code does not honor the collection level collation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72416&quot;&gt;&lt;del&gt;SERVER-72416&lt;/del&gt;&lt;/a&gt; Find and findAndModify commands&apos; ExpressionContext should inherit collection level collation&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit aed1cb6469f207e7e6ab053fdfb2c472b7b345ec.&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9642e21ac80ca1b1b019b56a57b21b487107ad3f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9642e21ac80ca1b1b019b56a57b21b487107ad3f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5096891" author="xgen-internal-githook" created="Fri, 6 Jan 2023 21:12:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Arun Banala&apos;, &apos;email&apos;: &apos;arun.banala@mongodb.com&apos;, &apos;username&apos;: &apos;banarun&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72416&quot; title=&quot;The find and findAndModify projection code does not honor the collection level collation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72416&quot;&gt;&lt;del&gt;SERVER-72416&lt;/del&gt;&lt;/a&gt; Find and findAndModify commands&apos; ExpressionContext should inherit collection level collation&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 8fb9a8b130995a379fa1943233e9b91816cebd34)&lt;br/&gt;
(cherry picked from commit 48bce2f356dd7f1ba789fd0a8b965299041bec56)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a836a299e8237824cdedc45080de97274a3fda40&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a836a299e8237824cdedc45080de97274a3fda40&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5096534" author="JIRAUSER1271769" created="Fri, 6 Jan 2023 19:02:13 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=arun.banala%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;arun.banala@mongodb.com&quot;&gt;arun.banala@mongodb.com&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;We&apos;re scheduled to release 6.0.4-rc0 on Tuesday, January 10th.&#160; I&apos;m going through any outstanding items in the &lt;a href=&quot;https://jira.mongodb.org/secure/RapidBoard.jspa?rapidView=2061&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;6.0 Release Board&lt;/a&gt; for status updates.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Can this SERVER ticket be closed?&#160; It looks like the changes have been merged into the master branch.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="5093771" author="xgen-internal-githook" created="Thu, 5 Jan 2023 18:45:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Arun Banala&apos;, &apos;email&apos;: &apos;arun.banala@mongodb.com&apos;, &apos;username&apos;: &apos;banarun&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72416&quot; title=&quot;The find and findAndModify projection code does not honor the collection level collation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72416&quot;&gt;&lt;del&gt;SERVER-72416&lt;/del&gt;&lt;/a&gt; Find and findAndModify commands&apos; ExpressionContext should inherit collection level collation&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 2f1b039897aa55eb3007abbe1020e6e4967b4140)&lt;br/&gt;
Branch: v6.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/eb8910b86a503d0756371a9f69af3baf5ebd2044&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/eb8910b86a503d0756371a9f69af3baf5ebd2044&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5091760" author="xgen-internal-githook" created="Thu, 5 Jan 2023 00:56:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Arun Banala&apos;, &apos;email&apos;: &apos;arun.banala@mongodb.com&apos;, &apos;username&apos;: &apos;banarun&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72416&quot; title=&quot;The find and findAndModify projection code does not honor the collection level collation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72416&quot;&gt;&lt;del&gt;SERVER-72416&lt;/del&gt;&lt;/a&gt; Find and findAndModify commands&apos; ExpressionContext should inherit collection level collation&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 8fb9a8b130995a379fa1943233e9b91816cebd34)&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/34c3c8eb005f58da7bf733639eab49251206bd53&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/34c3c8eb005f58da7bf733639eab49251206bd53&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5091644" author="xgen-internal-githook" created="Thu, 5 Jan 2023 00:01:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Arun Banala&apos;, &apos;email&apos;: &apos;arun.banala@mongodb.com&apos;, &apos;username&apos;: &apos;banarun&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72416&quot; title=&quot;The find and findAndModify projection code does not honor the collection level collation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72416&quot;&gt;&lt;del&gt;SERVER-72416&lt;/del&gt;&lt;/a&gt; Find and findAndModify commands&apos; ExpressionContext should inherit collection level collation&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2f1b039897aa55eb3007abbe1020e6e4967b4140&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2f1b039897aa55eb3007abbe1020e6e4967b4140&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2221804">SERVER-72450</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2406577">SERVER-79592</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25041"><![CDATA[v6.2]]></customfieldvalue>
    <customfieldvalue key="23470"><![CDATA[v6.0]]></customfieldvalue>
    <customfieldvalue key="21777"><![CDATA[v5.0]]></customfieldvalue>
    <customfieldvalue key="18953"><![CDATA[v4.4]]></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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5006R00001qFKDTQA4, 5006R00001qGYNNQA4, 5006R00001uMXGGQA4]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 28 Dec 2022 23:19:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 2 weeks, 2 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </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>
                            1 year, 2 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</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>arun.banala@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>james.hippler@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1ohi7:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="5926">QE 2023-01-09</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|i1o3nj:</customfieldvalue>

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