<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:59:28 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-3378] UUIDCodec default UuidRepresentation should be STANDARD</title>
                <link>https://jira.mongodb.org/browse/JAVA-3378</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;According to documentation, since version 3.0 the default UUID representation is the `STANDARD` one.&lt;/p&gt;

&lt;p&gt;Except for `UuidCodec` default constructor uses `JAVA_LEGACY` representation, making applications still store `LUUID` by default.&lt;/p&gt;

&lt;p&gt;It is interesting to note that `ValueCodecProvider`, which is the default codec provider uses the default constructor for `UuidCodec`, making sure that `JAVA_LEGACY`/`LUUID` type is used by default.&lt;/p&gt;

&lt;p&gt;I think the default constructor can be changed to `STANDARD` representation, as stated in documentation, and even in code:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// changed the default subtype to STANDARD since 3.0&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;if (encoderUuidRepresentation == UuidRepresentation.STANDARD) {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; writer.writeBinaryData(new BsonBinary(BsonBinarySubType.UUID_STANDARD, binaryData));&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;} else {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; writer.writeBinaryData(new BsonBinary(BsonBinarySubType.UUID_LEGACY, binaryData));&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Environment variables could be used to restore legacy behaviour withour resorting to mess with code.&lt;/p&gt;</description>
                <environment>Windows 10</environment>
        <key id="887118">JAVA-3378</key>
            <summary>UUIDCodec default UuidRepresentation should be STANDARD</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="gmcouto@gmail.com">Gabriel Couto</reporter>
                        <labels>
                    </labels>
                <created>Thu, 8 Aug 2019 03:17:21 +0000</created>
                <updated>Thu, 19 Dec 2019 19:07:42 +0000</updated>
                            <resolved>Thu, 19 Dec 2019 19:07:42 +0000</resolved>
                                    <version>3.0.0</version>
                                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2653226" author="jeff.yemin" created="Thu, 19 Dec 2019 19:07:42 +0000"  >&lt;p&gt;Now that &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-3518&quot; title=&quot;Change default UUID representation to Unspecified&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-3518&quot;&gt;&lt;del&gt;JAVA-3518&lt;/del&gt;&lt;/a&gt; is done, I&apos;m closing this request.  I recognize that the solution we came up with in the linked specification may not be to your liking, but on balance we believe it to be the best compromise we had available to us given the state of UUID decoding/encoding in the various MongoDB drivers.&lt;/p&gt;</comment>
                            <comment id="2653204" author="jeff.yemin" created="Thu, 19 Dec 2019 19:05:34 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/uuid.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/uuid.rst&lt;/a&gt; for the cross-driver specification for handling UUID encoding and decoding.&lt;/p&gt;

&lt;p&gt;Also linked to &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-3518&quot; title=&quot;Change default UUID representation to Unspecified&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-3518&quot;&gt;&lt;del&gt;JAVA-3518&lt;/del&gt;&lt;/a&gt;, under which we change the default UUID representation to UNSPECIFIED.  This will be included in the upcoming 4.0 release of the driver.&lt;/p&gt;</comment>
                            <comment id="2385066" author="gmcouto@gmail.com" created="Fri, 23 Aug 2019 20:36:53 +0000"  >&lt;p&gt;Thanks for the reply Jeffrey,&lt;/p&gt;

&lt;p&gt;I know that keeping legacy applications working is the main concern of any change.&lt;br/&gt;
But my point is that its kind of weird that there are references saying the default was going to change, and, at the same time, currently I have to basically make a custom ValueCodecProvider and CodecRegistry so that the driver can use the correct implementation of UUID, instead of LUUID. That is a terrible and non-portable solution. &lt;/p&gt;

&lt;p&gt;If one application from our stack decides to use the the correct implementation of UUID, we will have to ship a library and create custom configuration for each of them.&lt;/p&gt;

&lt;p&gt;That could be easily solved with some environment/jvm variable. I wonder if the drivers for other languages treat the correct UUID as second-class citizen too.&lt;/p&gt;

&lt;p&gt;We have given up on using UUID because we thought configuring it on our whole ecosystem seems to be to much of trouble.&lt;/p&gt;</comment>
                            <comment id="2377077" author="jeff.yemin" created="Mon, 19 Aug 2019 13:52:39 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=gmcouto%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;gmcouto@gmail.com&quot;&gt;gmcouto@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;I understand your desire for Standard to be the default.  It&apos;s ours as well, but we have to be careful.  If we just change the default, we risk data corruption for existing applications that already have legacy UUID data in their MongoDB collections.&lt;/p&gt;

&lt;p&gt;We&apos;re working on a plan for 4.0 to change the default to standard, but in a way that protects existing applications.&lt;/p&gt;</comment>
                            <comment id="2362258" author="gmcouto@gmail.com" created="Thu, 8 Aug 2019 03:18:29 +0000"  >&lt;p&gt;I thought JIRA used markdown, sorry for the misformating. My first time on JIRA.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1030482">JAVA-3518</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|hvyn1j:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>