<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:15:38 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-7804] compareElementValues for CodeWScope is broken</title>
                <link>https://jira.mongodb.org/browse/SERVER-7804</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt; f = strcmp( l.codeWScopeScopeDataUnsafe() , r.codeWScopeScopeDataUnsafe() );&lt;/p&gt;

&lt;p&gt;1) codeWScopeScopeDataUnsafe is deprecated because it is broken&lt;br/&gt;
2) strcmp stops at the first NUL byte, which is (almost) guaranteed to be within the BSON size int.&lt;br/&gt;
3) Ideally the comparison wouldn&apos;t depend on having the scope serialized to BSON. A simple solution would be to just use the normal BSONObj::woCompare to compare the scopes.&lt;br/&gt;
4) (added later) The code part is also compared with strcmp rather than memcmp.&lt;/p&gt;

&lt;p&gt;Unfortunately this requires an index rev bump to fix since someone (probably mistakenly) might have indexed a field containing CodeWScope.&lt;/p&gt;</description>
                <environment></environment>
        <key id="57944">SERVER-7804</key>
            <summary>compareElementValues for CodeWScope is broken</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="mathias@mongodb.com">Mathias Stearn</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Nov 2012 22:45:19 +0000</created>
                <updated>Fri, 23 Jan 2015 16:55:30 +0000</updated>
                            <resolved>Fri, 9 Jan 2015 16:25:40 +0000</resolved>
                                                    <fixVersion>2.8.0-rc5</fixVersion>
                                    <component>Index Maintenance</component>
                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="799204" author="xgen-internal-githook" created="Wed, 7 Jan 2015 17:21:31 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: Make BSONObj::woCompare a total ordering&lt;/p&gt;

&lt;p&gt;Changes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Date and Timestamp are now distinct with all Dates before all Timestamps.&lt;/li&gt;
	&lt;li&gt;Numeric comparisons now correctly handle Doubles and Long &amp;gt; 2**53.&lt;/li&gt;
	&lt;li&gt;CodeWScope doesn&apos;t strcmp BSONObjs or strings which may contain NULs.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;There should be no changes in any of the cases where woCompare defined a&lt;br/&gt;
correct total ordering before. The new behavior matches the ordering defined&lt;br/&gt;
by KeyString.&lt;/p&gt;

&lt;p&gt;Related tickets:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3304&quot; title=&quot;Change comparison order so all Dates sort before all Timestamps&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3304&quot;&gt;&lt;del&gt;SERVER-3304&lt;/del&gt;&lt;/a&gt; Error comparing Date and Timestamp&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3719&quot; title=&quot;woCompare does not provide a total order over doubles and longs.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3719&quot;&gt;&lt;del&gt;SERVER-3719&lt;/del&gt;&lt;/a&gt; Total ordering over Longs and Doubles&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-7804&quot; title=&quot;compareElementValues for CodeWScope is broken&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-7804&quot;&gt;&lt;del&gt;SERVER-7804&lt;/del&gt;&lt;/a&gt; CodeWScope comparisons are broken&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-16632&quot; title=&quot;Change WiredTiger index key format to no longer use BSON&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-16632&quot;&gt;&lt;del&gt;SERVER-16632&lt;/del&gt;&lt;/a&gt; Change WiredTiger index key format&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Changes to the comparison function for aggregation will be handled separately&lt;br/&gt;
as &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-16708&quot; title=&quot;Adjust Value::compare() to reflect changes to BSON::woCompare()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-16708&quot;&gt;&lt;del&gt;SERVER-16708&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f58fa5f78a91ce36d8e31d6730ebfdaa6cc1d5ab&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f58fa5f78a91ce36d8e31d6730ebfdaa6cc1d5ab&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="202627" author="redbeard0531" created="Thu, 29 Nov 2012 22:54:19 +0000"  >&lt;p&gt;Related: if we are going to change the compare order for CodeWScope, we should also give it the same canonicalType as Code so that a CodeWScope with an empty scope compares equal to a regular Code with the same text.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10220">
                    <name>Tested</name>
                                            <outwardlinks description="tested by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 7 Jan 2015 17:21:31 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 6 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>atul.kachru</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            9 years, 6 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrng1b:</customfieldvalue>

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

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

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