<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:29 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>[CSHARP-665] MaxDocuments is Int64</title>
                <link>https://jira.mongodb.org/browse/CSHARP-665</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;When the MaxDocument of Collection is huge,over Int32,there will be a Error&lt;br/&gt;
        /// &amp;lt;summary&amp;gt;&lt;br/&gt;
        /// Gets the index count.&lt;br/&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br/&gt;
        public long MaxDocuments&lt;br/&gt;
        {&lt;br/&gt;
            get &lt;/p&gt;
{ return Response.GetValue(&quot;max&quot;, 0).ToInt32(); }
&lt;p&gt;        }&lt;/p&gt;</description>
                <environment>C#Dirver 1.71</environment>
        <key id="62684">CSHARP-665</key>
            <summary>MaxDocuments is Int64</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="3">Duplicate</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="magicdict">???</reporter>
                        <labels>
                    </labels>
                <created>Sun, 20 Jan 2013 12:17:09 +0000</created>
                <updated>Thu, 20 Mar 2014 14:36:22 +0000</updated>
                            <resolved>Sun, 17 Feb 2013 15:21:57 +0000</resolved>
                                    <version>1.7</version>
                                    <fixVersion>1.8</fixVersion>
                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="268612" author="rstam" created="Sun, 17 Feb 2013 15:21:57 +0000"  >&lt;p&gt;Fixed in version 1.8 (see &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-639&quot; title=&quot;CollectionStatsResult.MaxDocuments throws an InavlidCastException for capped collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-639&quot;&gt;&lt;del&gt;CSHARP-639&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;</comment>
                            <comment id="268587" author="craiggwilson" created="Sun, 17 Feb 2013 14:28:10 +0000"  >&lt;p&gt;Yes, you will still get the issue in version 1.7.  1.8 is the fix version for this.  It should come out in 2-3 weeks.  Robert was simply pointing you at the commit that fixes this issue.&lt;/p&gt;</comment>
                            <comment id="268560" author="magicdict" created="Sun, 17 Feb 2013 13:34:34 +0000"  >&lt;p&gt;Reply of my client is that:&lt;br/&gt;
the MongoDB Driver is 1.7&lt;br/&gt;
and the stack trace like this:&lt;/p&gt;

&lt;p&gt;System.InvalidCastException: &#26080;&#27861;&#23558;&#31867;&#22411;&#20026;&#8220;MongoDB.Bson.BsonDouble&#8221;&#30340;&#23545;&#35937;&#24378;&#21046;&#36716;&#25442;&#20026;&#31867;&#22411;&#8220;MongoDB.Bson.BsonInt32&#8221;&#12290;&lt;br/&gt;
   &#22312; MongoDB.Driver.CollectionStatsResult.get_MaxDocuments()&lt;br/&gt;
   &#22312; MagicMongoDBTool.Module.MongoDBHelper.FillCollectionStatusToList(ListView lstData) &#20301;&#32622; F:\Downloads\MagicMongoDBTool-master\MagicMongoDBTool-master\MagicMongoDBTool\Module\MongoDBHelper\MongoDBHelper_Status.cs:&#34892;&#21495; 186&lt;/p&gt;

&lt;p&gt;I think there is maybe something wrong with get_MaxDocuments.....&lt;/p&gt;</comment>
                            <comment id="259975" author="rstam" created="Thu, 7 Feb 2013 13:42:12 +0000"  >&lt;p&gt;Thank you. Happy Chinese New Year!&lt;/p&gt;</comment>
                            <comment id="259769" author="magicdict" created="Thu, 7 Feb 2013 07:19:08 +0000"  >&lt;p&gt;Thank you for your reply.&lt;br/&gt;
I will confirm the version of C# driver.&lt;br/&gt;
As it is Chinese New Year Now,it will take some time to comfirm it.&lt;/p&gt;

</comment>
                            <comment id="259650" author="rstam" created="Thu, 7 Feb 2013 02:50:39 +0000"  >&lt;p&gt;This is the commit that fixed this issue for 1.7:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/rstam/mongo-csharp-driver/commit/4f1050fe7b0a97bfa4aeee4f0a90a0f2afea5306&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/rstam/mongo-csharp-driver/commit/4f1050fe7b0a97bfa4aeee4f0a90a0f2afea5306&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="259648" author="rstam" created="Thu, 7 Feb 2013 02:48:38 +0000"  >&lt;p&gt;Can you make sure that you are actually using version 1.7 of the C# driver?&lt;/p&gt;

&lt;p&gt;The stack trace you provided shows the driver calling AsInt32, but the current version of the driver calls ToInt32 (which could still theoretically overflow, but would not result in the exception shown by your stack trace).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="58558">CSHARP-639</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="23302" name="Catch.jpg" size="70032" author="magicdict" created="Sun, 20 Jan 2013 12:17:09 +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|hrlpqn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>40224</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>