<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:22:25 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>[DRIVERS-806] $meta:&quot;sortKey&quot; expressions can generate BSON with duplicate field names which are not correctly handled by Document/Value class</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-806</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>    &lt;div class=&quot;panel&quot; style=&quot;background-color: #c2d2c2;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;background-color: #239eb0;&quot;&gt;&lt;b&gt;Downstream Change Summary&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #c2d2c2;&quot;&gt;
&lt;p&gt;    This change affects how clients will see the results of a {$meta: &quot;sortKey&quot;} projection or a {$meta: &quot;sortKey&quot;} aggregation expression. From a quick search, I didn&apos;t find any documentation for this feature, but if there are examples in the documentation, they should be upgraded to show the new format. A release note about the change might be warranted as well.&lt;/p&gt;

&lt;p&gt;Previously, the result of {$meta: &quot;sortKey&quot;} would look like:&lt;/p&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: {&amp;quot;&amp;quot;}&lt;/span&gt; &lt;/div&gt;

&lt;p&gt;With this change in place the same sort key will look like this:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;first component&amp;quot;, &amp;quot;second component&amp;quot;, ..., &amp;quot;last component&amp;quot;&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;I don&apos;t think any drivers are relying on the format of the sort key, but if they are, they will likely need minor compatibility fixes. Message me or the server-query Slack channel, and we can work out the details. Thanks!&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name=&quot;DescriptionofLinkedTicket&quot;&gt;&lt;/a&gt;Description of Linked Ticket&lt;/h2&gt;
&lt;p&gt;    If a document has a compound sort key (e.g.: &lt;/p&gt;
{&quot;&quot;: 1, &quot;&quot;: 2}
&lt;p&gt;) and an expression tries to manipulate it, the result may only take one of the fields into account. For example, if the user tries to use {$objectToArray: {$meta: &quot;sortKey&quot;}}, the resulting array only has the first element (&lt;/p&gt;
{k: &quot;&quot;, v: 1}
&lt;p&gt;).&lt;/p&gt;

&lt;p&gt;I haven&apos;t encountered any cases yet, but it&apos;s possible that as we use Document/Value more we&apos;ll run into internal cases where we are manipulating Documents with duplicate fields.&lt;/p&gt;

&lt;p&gt;In general, there is no invariant that all field names in a BSONObj are unique, but the only safe way to have a Document with duplicate field names is when you create it from a BSONObj and convert back to a BSONObj with no transformations (so that the lazy conversion behavior just returns the original BSONObj).&lt;/p&gt;
</description>
                <environment></environment>
        <key id="1052605">DRIVERS-806</key>
            <summary>$meta:&quot;sortKey&quot; expressions can generate BSON with duplicate field names which are not correctly handled by Document/Value class</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="-1">Unassigned</assignee>
                                    <reporter username="backlog-server-pm">Backlog - Core Eng Program Management Team</reporter>
                        <labels>
                    </labels>
                <created>Fri, 13 Dec 2019 22:59:22 +0000</created>
                <updated>Tue, 28 Feb 2023 17:33:29 +0000</updated>
                            <resolved>Tue, 28 Feb 2023 17:33:29 +0000</resolved>
                                                                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5237317" author="jessica.sigafoos" created="Tue, 28 Feb 2023 17:33:29 +0000"  >&lt;p&gt;No driver changes needed.&lt;/p&gt;</comment>
                            <comment id="5218008" author="rachelle.palmer" created="Tue, 21 Feb 2023 19:25:18 +0000"  >&lt;p&gt;Bumping to Needs Triage - if nothing is truly needed, lets close &lt;/p&gt;</comment>
                            <comment id="3092186" author="jeff.yemin" created="Mon, 18 May 2020 13:58:51 +0000"  >&lt;p&gt;Nothing needed, Matt.&lt;/p&gt;</comment>
                            <comment id="3092085" author="matt.broadstone" created="Mon, 18 May 2020 13:24:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin&quot;&gt;jeff.yemin&lt;/a&gt; ping&lt;/p&gt;</comment>
                            <comment id="2766067" author="esha.bhargava" created="Mon, 27 Jan 2020 17:44:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin&quot;&gt;jeff.yemin&lt;/a&gt; Can you check if this is needed for any of your teams?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="942559">SERVER-43669</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                            <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvwrb3:</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_11150" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>SERVER fixVersion</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16441"><![CDATA[4.4]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_22279" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Server Compat</customfieldname>
                        <customfieldvalues>
                                        <label>4.3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_21457" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Upstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;This change affects how clients will see the results of a {$meta: &quot;sortKey&quot;} projection or a {$meta: &quot;sortKey&quot;} aggregation expression. From a quick search, I didn&apos;t find any documentation for this feature, but if there are examples in the documentation, they should be upgraded to show the new format. A release note about the change might be warranted as well.&lt;/p&gt;

&lt;p&gt;Previously, the result of {$meta: &quot;sortKey&quot;} would look like:&lt;/p&gt;
{&quot;&quot;: &quot;first component&quot;, &quot;second component&quot;, ..., &quot;&quot;: &quot;last component&quot;}

&lt;p&gt;With this change in place the same sort key will look like this:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;first component&amp;quot;, &amp;quot;second component&amp;quot;, ..., &amp;quot;last component&amp;quot;&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;I don&apos;t think any drivers are relying on the format of the sort key, but if they are, they will likely need minor compatibility fixes. Message me or the server-query Slack channel, and we can work out the details. Thanks!&lt;/p&gt;</customfieldvalue>

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