<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:31: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-76060] sbe::value::serializeValue/deserializeValue omits ArraySet collator</title>
                <link>https://jira.mongodb.org/browse/SERVER-76060</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When we serialize ArraySet on &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1e4a5d6a985748290b83a470cfa157af1db0ba8d/src/mongo/db/exec/sbe/values/row.cpp#L276&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;src/mongo/db/exec/sbe/values/row.cpp#L276&lt;/a&gt; we don&apos;t include any information about collation.&#160;&lt;/p&gt;

&lt;p&gt;So when we deserialize it on &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1e4a5d6a985748290b83a470cfa157af1db0ba8d/src/mongo/db/exec/sbe/values/row.cpp#L118&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;L118&lt;/a&gt; we create new ArraySet without collation, which can potentially lead to problems.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2313981">SERVER-76060</key>
            <summary>sbe::value::serializeValue/deserializeValue omits ArraySet collator</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="13201">Fixed</resolution>
                                        <assignee username="rui.liu@mongodb.com">Rui Liu</assignee>
                                    <reporter username="ivan.fefer@mongodb.com">Ivan Fefer</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Apr 2023 15:25:38 +0000</created>
                <updated>Mon, 30 Oct 2023 14:30:59 +0000</updated>
                            <resolved>Mon, 10 Jul 2023 20:43:39 +0000</resolved>
                                                    <fixVersion>7.1.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="5815281" author="xgen-internal-githook" created="Fri, 27 Oct 2023 15:07:24 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Rui Liu&apos;, &apos;email&apos;: &apos;lriuui0x0@gmail.com&apos;, &apos;username&apos;: &apos;lriuui0x0&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81390&quot; title=&quot;HashAggStage fails to respect the collation when spilling to disk&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81390&quot;&gt;&lt;del&gt;SERVER-81390&lt;/del&gt;&lt;/a&gt; Use collator to create the record key in hash_agg&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-76060&quot; title=&quot;sbe::value::serializeValue/deserializeValue omits ArraySet collator&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-76060&quot;&gt;&lt;del&gt;SERVER-76060&lt;/del&gt;&lt;/a&gt; Deserialize SBE ArraySet with collator&lt;/p&gt;

&lt;p&gt;(cherry picked from commit a19074b842b752ee0a61810e0b8f6d79c5aa80c1)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81390&quot; title=&quot;HashAggStage fails to respect the collation when spilling to disk&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81390&quot;&gt;&lt;del&gt;SERVER-81390&lt;/del&gt;&lt;/a&gt; Use collator to create the record key in hash_agg&lt;/p&gt;

&lt;p&gt;(cherry picked from commit d0811e844e8566dc276fcd73fceabec71c0e2717)&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/62d51d7f2698547635f4df12049f70ba283b74b7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/62d51d7f2698547635f4df12049f70ba283b74b7&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5814473" author="xgen-internal-githook" created="Fri, 27 Oct 2023 12:17:18 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Rui Liu&apos;, &apos;email&apos;: &apos;lriuui0x0@gmail.com&apos;, &apos;username&apos;: &apos;lriuui0x0&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81390&quot; title=&quot;HashAggStage fails to respect the collation when spilling to disk&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81390&quot;&gt;&lt;del&gt;SERVER-81390&lt;/del&gt;&lt;/a&gt; Use collator to create the record key in hash_agg&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-76060&quot; title=&quot;sbe::value::serializeValue/deserializeValue omits ArraySet collator&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-76060&quot;&gt;&lt;del&gt;SERVER-76060&lt;/del&gt;&lt;/a&gt; Deserialize SBE ArraySet with collator&lt;/p&gt;

&lt;p&gt;(cherry picked from commit a19074b842b752ee0a61810e0b8f6d79c5aa80c1)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81390&quot; title=&quot;HashAggStage fails to respect the collation when spilling to disk&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81390&quot;&gt;&lt;del&gt;SERVER-81390&lt;/del&gt;&lt;/a&gt; Use collator to create the record key in hash_agg&lt;/p&gt;

&lt;p&gt;(cherry picked from commit d0811e844e8566dc276fcd73fceabec71c0e2717)&lt;br/&gt;
Branch: v7.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/62c4770285c731eb38bc0148c2f2d2fbc9f43dcb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/62c4770285c731eb38bc0148c2f2d2fbc9f43dcb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5555800" author="xgen-internal-githook" created="Mon, 10 Jul 2023 20:40:54 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Rui Liu&apos;, &apos;email&apos;: &apos;lriuui0x0@gmail.com&apos;, &apos;username&apos;: &apos;lriuui0x0&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-76060&quot; title=&quot;sbe::value::serializeValue/deserializeValue omits ArraySet collator&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-76060&quot;&gt;&lt;del&gt;SERVER-76060&lt;/del&gt;&lt;/a&gt; Deserialize SBE ArraySet with collator&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a19074b842b752ee0a61810e0b8f6d79c5aa80c1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a19074b842b752ee0a61810e0b8f6d79c5aa80c1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5467512" author="david.storch" created="Thu, 1 Jun 2023 14:58:07 +0000"  >&lt;p&gt;As discussed over Slack, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rui.liu%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;rui.liu@mongodb.com&quot;&gt;rui.liu@mongodb.com&lt;/a&gt; is going to write a script to prove that there is a real bug here. Something like $group with an $addToSet that has to spill and where the query uses a case-insensitive collation. In this case, after merging spilled partial aggregates, the $addToSet value could end up with strings that only differ by their case, meaning that the case-insensitive collation was not respected.&lt;/p&gt;</comment>
                            <comment id="5421258" author="JIRAUSER1261330" created="Fri, 12 May 2023 16:52:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rushan.chen%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;rushan.chen@mongodb.com&quot;&gt;rushan.chen@mongodb.com&lt;/a&gt; Sorry missed the comment. Nope, the accumulator we plan to implement will not use those data structures and the collator is not saved in the state.&lt;/p&gt;</comment>
                            <comment id="5358114" author="JIRAUSER1270969" created="Wed, 19 Apr 2023 08:21:26 +0000"  >&lt;p&gt;So the answer is &quot;it depends&quot;.&lt;/p&gt;

&lt;p&gt;Previous similar bug &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-75752&quot; title=&quot;Pass collator to ArraySet for $in expression&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-75752&quot;&gt;&lt;del&gt;SERVER-75752&lt;/del&gt;&lt;/a&gt; was only a performance issue, as ArraySet is built from already unique elements (from query collator point of view) and VM would fall back to linear search if collator passed to collIsMember doesn&apos;t match array set collator.&lt;/p&gt;

&lt;p&gt;Here we are dealing with general serialization/deserialization function, which doesn&apos;t return exactly the same object after serialization/deserialization.&lt;/p&gt;

&lt;p&gt;So imagine SBE code that does the following:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Creates ArraySet with &quot;case insensitive&quot; collator.&lt;/li&gt;
	&lt;li&gt;Add string &quot;A&quot; to ArraySet&lt;/li&gt;
	&lt;li&gt;Serialize&lt;/li&gt;
	&lt;li&gt;Deserialize&lt;/li&gt;
	&lt;li&gt;Add string &quot;a&quot;.&lt;/li&gt;
	&lt;li&gt;We could reasonably expect ArraySet to contain only one string, but it will actually contain 2.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;However, this actually doesn&apos;t happen: to my knowledge there is no valid MQL query that will produce something like that.&lt;br/&gt;
Current when we serialize ArraySet&apos;s, we only full scanning them after deserialization to do something like setUnion.&lt;br/&gt;
And for this case, actually omitting collation gives us performance boost, because we don&apos;t have to deal with collation keys, when re-building ArraySet.&lt;/p&gt;

&lt;p&gt;So to conclude, current version works and it performs better than if we support collation, but it is not &quot;future-proof&quot;.&lt;/p&gt;

&lt;p&gt;Maybe we can &quot;future-proof&quot; it by explicitly converting ArraySet to Array when serializing, so this behavior would be expected and documented in code and unit tests?&lt;/p&gt;</comment>
                            <comment id="5356705" author="kyle.suarez" created="Tue, 18 Apr 2023 18:44:22 +0000"  >&lt;p&gt;After discussion in the triage meeting, we weren&apos;t sure this was a bug. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.storch%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;david.storch@mongodb.com&quot;&gt;david.storch@mongodb.com&lt;/a&gt; thought that if we omit a collator then we would no longer use the hash table and instead you would need to walk the data structure linearly?&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ivan.fefer%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;ivan.fefer@mongodb.com&quot;&gt;ivan.fefer@mongodb.com&lt;/a&gt;, is this a correctness issue or are you thinking of this as a performance improvement?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25578"><![CDATA[v7.0]]></customfieldvalue>
    <customfieldvalue key="23470"><![CDATA[v6.0]]></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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 18 Apr 2023 18:44:22 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        14 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_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>backlog-server-backport</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            14 weeks, 5 days ago
                        </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>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>ivan.fefer@mongodb.com</customfieldvalue>
            <customfieldvalue>kyle.suarez@mongodb.com</customfieldvalue>
            <customfieldvalue>rui.liu@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i24l7z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1mwtk:</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="7233">QE 2023-05-29</customfieldvalue>
    <customfieldvalue id="7238">QE 2023-06-26</customfieldvalue>
    <customfieldvalue id="7239">QE 2023-07-10</customfieldvalue>
    <customfieldvalue id="7241">QE 2023-07-24</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|i247db:</customfieldvalue>

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