<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56:00 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>[JAVA-1971] System-generated index names assume asc/desc is specified with an Int32</title>
                <link>https://jira.mongodb.org/browse/JAVA-1971</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;&lt;tt&gt;com.mongodb.operations.IndexHelper#generateIndexName&lt;/tt&gt; assumes that the ascending/descending specifier for a key is either a &lt;tt&gt;BsonInt32&lt;/tt&gt; or a &lt;tt&gt;String&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;In the case of Clojure (at least), integer literals default to &lt;tt&gt;Long&lt;/tt&gt; rather than &lt;tt&gt;Integer&lt;/tt&gt;. The translation from a &lt;tt&gt;DBObject&lt;/tt&gt; to a &lt;tt&gt;BsonDocument&lt;/tt&gt; converts these longs to &lt;tt&gt;BsonInt64&lt;/tt&gt; types.&lt;/p&gt;

&lt;p&gt;This causes system generated index names to elide the ascending/descending information leading to index name collisions.&lt;/p&gt;

&lt;p&gt;Not a blocker, the obvious workaround is to ensure ascending/descending specifiers are Integers.&lt;/p&gt;

&lt;p&gt;I&apos;ve attached a patch that uses &lt;tt&gt;BsonNumber&lt;/tt&gt; to avoid this issue and confirmed it works when invoked from Clojure. Obviously I&apos;ve got very limited context into the development of Mongo&apos;s Java driver so this probably isn&apos;t the right approach, but does illustrate the issue.&lt;/p&gt;</description>
                <environment></environment>
        <key id="230460">JAVA-1971</key>
            <summary>System-generated index names assume asc/desc is specified with an Int32</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="gordonsyme">Gordon Syme</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Sep 2015 15:38:35 +0000</created>
                <updated>Wed, 7 Oct 2015 13:01:02 +0000</updated>
                            <resolved>Fri, 25 Sep 2015 14:18:10 +0000</resolved>
                                    <version>3.0.4</version>
                                    <fixVersion>3.1.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1053715" author="jeff.yemin" created="Wed, 7 Oct 2015 13:01:02 +0000"  >&lt;p&gt;Released in &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/releases/tag/r3.1.0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;3.1.0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1043390" author="xgen-internal-githook" created="Fri, 25 Sep 2015 14:18:00 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Updated IndexHelper to take any BsonNumber&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1971&quot; title=&quot;System-generated index names assume asc/desc is specified with an Int32&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1971&quot;&gt;&lt;del&gt;JAVA-1971&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/169aa0c5db4387874b62005672ebdf529e9905c9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/169aa0c5db4387874b62005672ebdf529e9905c9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1037116" author="jeff.yemin" created="Fri, 18 Sep 2015 18:33:03 +0000"  >&lt;p&gt;Hi Gordon,&lt;/p&gt;

&lt;p&gt;I&apos;ll try to get this into the 3.1 release.   Thanks for the report.  &lt;/p&gt;

&lt;p&gt;I think the fix looks good.  Just need to add a test for it.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="90463" name="generateIndexNames.patch" size="1152" author="gordonsyme" created="Fri, 18 Sep 2015 15:38:35 +0000"/>
                    </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|hrexqf:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="742">Java Sprint 26</customfieldvalue>

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