<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:36: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>[GODRIVER-1551] Allow BSON undefined to decode to Go types</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-1551</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;The driver already allows decoding BSON Null as an integer type and it should do the same for the BSON Undefined type.&lt;/p&gt;

&lt;p&gt;This caused an error in ADL because the shell&apos;s `db.stats()` command sends the `scale` parameter as BSON undefined, which was not coerced to an integer but failed decoding instead:&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;&amp;gt; db.stats()&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;{&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;        &quot;ok&quot; : 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;        &quot;errmsg&quot; : &quot;failed to parse command: cannot decode undefined into an integer type, correlationID = 16025a5ab6004ec18d14584f&quot;,&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;        &quot;code&quot; : 9,&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;        &quot;codeName&quot; : &quot;FailedToParse&quot;&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;</description>
                <environment></environment>
        <key id="1303524">GODRIVER-1551</key>
            <summary>Allow BSON undefined to decode to Go types</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="13201">Fixed</resolution>
                                        <assignee username="divjot.arora@mongodb.com">Divjot Arora</assignee>
                                    <reporter username="david.golden@mongodb.com">David Golden</reporter>
                        <labels>
                    </labels>
                <created>Fri, 3 Apr 2020 15:56:59 +0000</created>
                <updated>Sat, 28 Oct 2023 11:38:15 +0000</updated>
                            <resolved>Wed, 8 Apr 2020 20:06:53 +0000</resolved>
                                    <version>1.3.1</version>
                                    <fixVersion>1.4.0</fixVersion>
                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3031904" author="xgen-internal-githook" created="Wed, 8 Apr 2020 20:07:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Divjot Arora&apos;, &apos;email&apos;: &apos;divjot.arora@10gen.com&apos;, &apos;username&apos;: &apos;divjotarora&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1551&quot; title=&quot;Allow BSON undefined to decode to Go types&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1551&quot;&gt;&lt;del&gt;GODRIVER-1551&lt;/del&gt;&lt;/a&gt; Allow BSON undefined values to decode into Go types (#360)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/7019e82e76c06ff1dc764557000112c8b6fc485b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/7019e82e76c06ff1dc764557000112c8b6fc485b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3031570" author="divjot.arora" created="Wed, 8 Apr 2020 17:58:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/pull/360&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/pull/360&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3026056" author="benjamin.flast" created="Fri, 3 Apr 2020 21:35:17 +0000"  >&lt;p&gt;Yes, 1.4.0 should be fine.&#160; We expect db.stats() to be used more heavily through ADL when a new Atlas feature called Online Archive comes out, and that will be coming out at a similar time to 4.4 Server.&lt;/p&gt;</comment>
                            <comment id="3025443" author="david.golden" created="Fri, 3 Apr 2020 16:59:00 +0000"  >&lt;p&gt;I think 1.4.0 timeframe is fine.&#160;&#160;+&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=benjamin.flast&quot; class=&quot;user-hover&quot; rel=&quot;benjamin.flast&quot;&gt;benjamin.flast&lt;/a&gt;&#160;can comment further.&lt;/p&gt;

&lt;p&gt;The problem is that &quot;db.stats()&quot; apparently is a not-uncommon thing for people to run to see &quot;what&apos;s in my database&quot; and so it&apos;s a bad early user-experience.&#160; Fixing this in ADL would mean having to duplicate a lot of the driver&apos;s existing &quot;convert X to int&quot; code, so we&apos;d rather see this fixed driver-side, where it seems to be mostly a matter of adding an extra &lt;tt&gt;case&lt;/tt&gt; statement to the existing value decoders (plus tests).&lt;/p&gt;</comment>
                            <comment id="3025384" author="craiggwilson" created="Fri, 3 Apr 2020 16:34:50 +0000"  >&lt;p&gt;Yeah... I don&apos;t really remember the context or which way I argued, but I do think this now a request we&apos;ve received and is needed. The shell sends &lt;tt&gt;undefined&lt;/tt&gt;, so, while deprecated, is still in use even by us.&lt;/p&gt;</comment>
                            <comment id="3025375" author="divjot.arora" created="Fri, 3 Apr 2020 16:28:43 +0000"  >&lt;p&gt;I&apos;m inclined to change this to a feature request. The work to allow BSON null values to decode into non-pointer types was done in &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1175&quot; title=&quot;allow BSON null values to decode into non-nilable Go types&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1175&quot;&gt;&lt;del&gt;GODRIVER-1175&lt;/del&gt;&lt;/a&gt;. In that PR, we discussed allowing undefined as well, but decided against it because we had not received any requests to do it and it is a deprecated BSON type.&lt;/p&gt;

&lt;p&gt;CC &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=craiggwilson&quot; class=&quot;user-hover&quot; rel=&quot;craiggwilson&quot;&gt;craiggwilson&lt;/a&gt; You brought up the possibility of handling undefined in the original PR. Any thoughts here?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </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|hus227:</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>