<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:35:52 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-1189] When I tried Count function against Azure CosmosDB with MongoDB Api, an error is returned read &quot;Invalid response from server, value field is not a number&quot;. The same code returned the number of items when ran against a MongoDB database. </title>
                <link>https://jira.mongodb.org/browse/GODRIVER-1189</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description></description>
                <environment>Azure CosmosDB</environment>
        <key id="835351">GODRIVER-1189</key>
            <summary>When I tried Count function against Azure CosmosDB with MongoDB Api, an error is returned read &quot;Invalid response from server, value field is not a number&quot;. The same code returned the number of items when ran against a MongoDB database. </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="manny.eppinger@mongodb.com">Emmanuel Eppinger</assignee>
                                    <reporter username="serdarkalayci">Serdar Kalayc&#305;</reporter>
                        <labels>
                    </labels>
                <created>Thu, 4 Jul 2019 12:19:41 +0000</created>
                <updated>Fri, 12 Jul 2019 18:08:11 +0000</updated>
                            <resolved>Fri, 12 Jul 2019 17:37:05 +0000</resolved>
                                    <version>1.0.3</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2323555" author="manny.eppinger" created="Fri, 12 Jul 2019 17:36:55 +0000"  >&lt;p&gt;Hi Serdar,&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;So it looks like MongoDB returns an int32 in the n field and CosmosDB seems to return an Int64 and for some reason, the .Net driver is able to deal with that. We don&apos;t test any of our drivers with Cosmos so it is probably a coincidence that the .Net driver is able to support that.&lt;/del&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;EDIT: It seems like the Go driver accepts int32, int64, and doubles for the count response. If you&apos;d like to dig into this deeper, you can use&#160;&lt;a href=&quot;https://docs.mongodb.com/manual/reference/program/bsondump/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/program/bsondump/&lt;/a&gt;&#160;to compare the bson results returned from mongo vs cosmos.&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Thanks &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Emmanuel&lt;/p&gt;</comment>
                            <comment id="2322688" author="serdarkalayci" created="Fri, 12 Jul 2019 10:50:53 +0000"  >&lt;p&gt;Hi Emmanuel,&lt;/p&gt;

&lt;p&gt;I&apos;m aware that CosmosDB is not fully compatible to MongoDB. But the .Net driver I used in my inquiries are also developed buy MongoDB and it handles what CosmosDB returns without a complaint. That&apos;s why I wanted to bring it to your attention.&lt;/p&gt;</comment>
                            <comment id="2317588" author="manny.eppinger" created="Tue, 9 Jul 2019 18:19:10 +0000"  >&lt;p&gt;Hi Serdar,&lt;/p&gt;

&lt;p&gt;Thank you for bringing this to our attention. However, we officially develop, test, and support the driver when running with MongoDB.&lt;/p&gt;

&lt;p&gt;CosmosDB implements an emulation of the MongoDB API, therefore there is only limited compatibility for queries that run from MongoDB drivers against CosmosDB. The best way to run MongoDB in Azure is via the MongoDB Atlas service. You can see a comparison of functionality here: &lt;a href=&quot;https://www.mongodb.com/cloud/atlas/compare&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/cloud/atlas/compare&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;

&lt;p&gt;Emmanuel&lt;/p&gt;</comment>
                            <comment id="2312751" author="serdarkalayci" created="Thu, 4 Jul 2019 12:20:54 +0000"  >&lt;p&gt;C# drivers works as expected with both databases. When I try to apply the same query via Robo3T, I saw that CosmosDB returns NumberLong(532) instead of just 532.&#160;&lt;/p&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|huzt6v:</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>