<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:38:19 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-2323] updateone function issue</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2323</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;when using the updateone function it results in&#160;&lt;/p&gt;

&lt;p&gt;response field &#8216;n&#8217; is type int32, but received BSON type 64-bit integer&lt;/p&gt;

&lt;p&gt;This error does not appear before version 1.7.5 of the driver&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Pleaseprovidetheversionofthedriver.Ifapplicable%2CpleaseprovidetheMongoDBserverversionandtopology%28standalone%2Creplicaset%2Corshardedcluster%29.&quot;&gt;&lt;/a&gt;Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).&lt;/h4&gt;

&lt;p&gt;Any version from 1.7.5 onwards&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;running any simple example of updateone leads to the issue&#160;&lt;/p&gt;

&lt;p&gt;the following code is taken from the mongo DB example in the documentation&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;opts := options.Update().SetUpsert(true) opts := options.Update().SetUpsert(true) filter := bson.D{{&quot;_id&quot;, id}} update := bson.D{{&quot;$set&quot;, bson.D{{&quot;email&quot;, &quot;newemail@example.com&quot;}}}}&lt;br/&gt;
 result, err := coll.UpdateOne(context.TODO(), filter, update, opts) if err != nil { log.Fatal(err) }&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1990838">GODRIVER-2323</key>
            <summary>updateone function issue</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="matt.dale@mongodb.com">Matt Dale</assignee>
                                    <reporter username="sachinhydratech@gmail.com">Sachin Sanjay</reporter>
                        <labels>
                    </labels>
                <created>Sat, 26 Feb 2022 09:17:43 +0000</created>
                <updated>Sat, 28 Oct 2023 11:37:38 +0000</updated>
                            <resolved>Mon, 11 Apr 2022 21:15:43 +0000</resolved>
                                    <version>1.7.5</version>
                    <version>1.8.1</version>
                    <version>1.8.2</version>
                    <version>1.8.3</version>
                                    <fixVersion>1.9.1</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4474774" author="JIRAUSER1259527" created="Mon, 11 Apr 2022 21:15:13 +0000"  >&lt;p&gt;Hey &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=sachinhydratech%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;sachinhydratech@gmail.com&quot;&gt;sachinhydratech@gmail.com&lt;/a&gt;, I just merged a change to add support for int32/int64 to &lt;tt&gt;UpdateOne&lt;/tt&gt; (and all numeric fields in all other CRUD operations). The fix will be included with the next patch release (v1.9.1), which is scheduled for May 3. I&apos;m closing this ticket for now, please respond here if you have any further questions. Thanks!&lt;/p&gt;</comment>
                            <comment id="4474772" author="xgen-internal-githook" created="Mon, 11 Apr 2022 21:14:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matt Dale&apos;, &apos;email&apos;: &apos;9760375+matthewdale@users.noreply.github.com&apos;, &apos;username&apos;: &apos;matthewdale&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2323&quot; title=&quot;updateone function issue&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2323&quot;&gt;&lt;del&gt;GODRIVER-2323&lt;/del&gt;&lt;/a&gt; Support int64 for &apos;n&apos; field in insert, update, and delete ops. (#905)&lt;br/&gt;
Branch: release/1.9&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/7ff10a8611161d71303106eeacc869f5f6a4e9e3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/7ff10a8611161d71303106eeacc869f5f6a4e9e3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4474732" author="xgen-internal-githook" created="Mon, 11 Apr 2022 21:07:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matt Dale&apos;, &apos;email&apos;: &apos;9760375+matthewdale@users.noreply.github.com&apos;, &apos;username&apos;: &apos;matthewdale&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2323&quot; title=&quot;updateone function issue&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2323&quot;&gt;&lt;del&gt;GODRIVER-2323&lt;/del&gt;&lt;/a&gt; Support int64 for &apos;n&apos; field in insert, update, and delete ops. (#905)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/5fe9dc5c4b63f496d2dcf791e8ca055a732fce97&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/5fe9dc5c4b63f496d2dcf791e8ca055a732fce97&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4397208" author="JIRAUSER1265170" created="Tue, 8 Mar 2022 08:22:05 +0000"  >&lt;p&gt;Hey Matt, As requested I did more research on the server-side and figured out it is hosted on Azure Cosmos DB which by default runs document DB I&apos;ve failed to notice this since it was working with the prior version of golang MongoDB driver 1.7.5. I think ever since the driver updates the update function breaks.&lt;/p&gt;

&lt;p&gt;I apologize for the misunderstanding, thanks for the help&lt;/p&gt;</comment>
                            <comment id="4396081" author="JIRAUSER1259527" created="Mon, 7 Mar 2022 19:24:09 +0000"  >&lt;p&gt;Hey &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=sachinhydratech%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;sachinhydratech@gmail.com&quot;&gt;sachinhydratech@gmail.com&lt;/a&gt; thanks for filing a ticket! It&apos;s unusual that the server response field &quot;n&quot; would be a 64-bit integer, as drivers expect that field to always be a 32-bit integer.&lt;/p&gt;

&lt;p&gt;I have a few questions to help get to the cause of the issue:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;What MongoDB server version are you using?&lt;/li&gt;
	&lt;li&gt;Are you using Atlas, Ops Manager, or a self-managed MongoDB deployment?&lt;/li&gt;
	&lt;li&gt;What MongoDB server topology are you using? E.g. a single node, a replica set, a sharded cluster?&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                    <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|i04hx8:</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>