<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:50 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-1163] FileSize exception in db.stats() / DatabaseStatsResult when WiredTiger in use</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1163</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;When using wiredTiger storage engine, all stats return properly except for FileSize:&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;dbsr&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;{MongoDB.Driver.DatabaseStatsResult}&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;    base: {MongoDB.Driver.DatabaseStatsResult}&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;    AverageObjectSize: 1874.7385493229142&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;    CollectionCount: 246&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;    DataSize: 1053679929&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;    ExtentCount: 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;    FileSize: &apos;dbsr.FileSize&apos; threw an exception of type &apos;System.Collections.Generic.KeyNotFoundException&apos;&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;    IndexCount: 2794&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;    IndexSize: 279265280&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;    ObjectCount: 562041&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;    StorageSize: 324399104&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>windows 8.1 .net 4.5.2 1.10-rc1</environment>
        <key id="178807">CSHARP-1163</key>
            <summary>FileSize exception in db.stats() / DatabaseStatsResult when WiredTiger in use</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="sallgeud">Chad Kreimendahl</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 Jan 2015 23:14:44 +0000</created>
                <updated>Mon, 6 Apr 2015 18:40:01 +0000</updated>
                            <resolved>Sat, 4 Apr 2015 22:09:50 +0000</resolved>
                                    <version>1.10</version>
                                                    <component>Error Handling</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="873759" author="craiggwilson" created="Mon, 6 Apr 2015 18:40:01 +0000"  >&lt;p&gt;You&apos;re right. We should have addressed this when we had the chance. My apologies for letting it slip through. Unfortunately, now that we&apos;ve released 2.0.0 final, we can&apos;t do this anymore.&lt;/p&gt;

&lt;p&gt;In this case, since you know FileSize is simply unreliable, can you not just stop using it? Not calling it seems like it would solve the problem? Alternatively, perhaps since you are trying to store these historically, you should stop using the provided GetStats method and, instead, run the command &lt;/p&gt;
{dbstats: 1}
&lt;p&gt; manually and let it come back as a BsonDocument. We don&apos;t provide a GetStats() method in the new API, so this is how it would be done if/when you migrate.&lt;/p&gt;

&lt;p&gt;Again, my apologies for not addressing this in time.&lt;br/&gt;
Craig&lt;/p&gt;</comment>
                            <comment id="873656" author="sallgeud" created="Mon, 6 Apr 2015 17:46:01 +0000"  >&lt;p&gt;Given that our efforts to update to 2.0 gave us about a dozen breaking changes (all of our custom dictionary serialiizers), I&apos;m curious why it couldn&apos;t be a breaking change to a nullable int in a 2.0?  It seems to fit much better. &lt;/p&gt;

&lt;p&gt;Given that any attempt to re-serialize the db.status() results in an exception... it becomes painful to do something like store your db stats historically in another collection. You basically have to write your own serializer for something that should just be null&lt;span class=&quot;error&quot;&gt;&amp;#91;able&amp;#93;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="873274" author="craiggwilson" created="Mon, 6 Apr 2015 12:24:22 +0000"  >&lt;p&gt;An exception is the most logical result here. If we don&apos;t have access to the actual value (because the server changed the response), then not throwing an exception would provide you with an invalid value. Changing the type to a nullable long would be a breaking change, so we can&apos;t do that. An exception is the only reasonable option left.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                            <comment id="873174" author="sallgeud" created="Mon, 6 Apr 2015 02:20:32 +0000"  >&lt;p&gt;At least make it not throw an exception?&lt;/p&gt;</comment>
                            <comment id="809872" author="sallgeud" created="Wed, 21 Jan 2015 20:12:42 +0000"  >&lt;p&gt;It appears that fileSize may be going away in general. While mmapv1 will have it, the others will not require it, as it can be expensive.&lt;/p&gt;

&lt;p&gt;I&apos;ve also found that storageSize + indexSize seems to be almost exactly the sizeOnDisk equivilent (which may work).  Of course, it may just be better to use only the ones that are common among all.&lt;/p&gt;</comment>
                            <comment id="804904" author="sallgeud" created="Wed, 14 Jan 2015 23:59:39 +0000"  >&lt;p&gt;I&apos;m just getting into the collection stats stuff now, too, and will have a bug for that one as well.  &lt;/p&gt;

&lt;p&gt;It looks like for database stats that, at least in the shell, it&apos;s substantially smaller set of data.  I&apos;d imagine that&apos;s the same data you get.  For collection stats, it appears there&apos;s a massive new set of info that it shares.... specifically about how it&apos;s doing indexes in WT.&lt;/p&gt;

&lt;p&gt;I think if they aren&apos;t reporting FileSize, that possibly a nullable value there would be best?  I&apos;d hate to assign it to dataSize and be wrong.  &lt;/p&gt;

&lt;p&gt;For collection stats, I think just getting the GetTotalDataSize and GetTotalStorageSize working again would be good enough.&lt;/p&gt;</comment>
                            <comment id="804873" author="craiggwilson" created="Wed, 14 Jan 2015 23:22:43 +0000"  >&lt;p&gt;Thanks Chad. &lt;/p&gt;

&lt;p&gt;Yeah, WT has some different output and I&apos;m not sure about what it all means yet. We are still deciding how exactly to handle some of these changes. Any thoughts you have would be welcome.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                            <comment id="804869" author="sallgeud" created="Wed, 14 Jan 2015 23:19:36 +0000"  >&lt;p&gt;I should say... the output from db.stats() on wiredTiger doesn&apos;t have a &quot;fileSize&quot;. I&apos;m wondering if this is a SERVER issue, not C#... and second, I&apos;m wondering if WT doesn&apos;t report FileSize, if DataSize might be identical?&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|hs5gx3:</customfieldvalue>

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