<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:42:09 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-2293] Implement new count API</title>
                <link>https://jira.mongodb.org/browse/CSHARP-2293</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Drivers supporting MongoDB 4.0 must deprecate the count() helper and add two new helpers - estimatedDocumentCount() and countDocuments(). Both helpers are supported with MongoDB 2.6+.&lt;/p&gt;

&lt;p&gt;The names of the new helpers were chosen to make it clear how they behave and exactly what they do. The estimatedDocumentCount helper returns an estimate of the count of documents in the collection using collection metadata, rather than counting the documents or consulting an index. The countDocuments helper counts the documents that match the provided query filter using an aggregation pipeline.&lt;/p&gt;

&lt;p&gt;The count() helper is deprecated. It has always been implemented using the count command. The behavior of the count command differs depending on the options passed to it and the topology in use and may or may not provide an accurate count. When no query filter is provided the count command provides an estimate using collection metadata. Even when provided with a query filter the count command can return inaccurate results with a sharded cluster &lt;a href=&quot;https://docs.mongodb.com/manual/reference/command/count/#behavior&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;if orphaned documents exist or if a chunk migration is in progress&lt;/a&gt;. The countDocuments helper avoids these sharded cluster problems entirely when used with MongoDB 3.6+, and when using `Primary` read preference with older sharded clusters.&lt;/p&gt;

&lt;p&gt;The following spec change describes the necessary changes in detail, including implementation notes and yml / json spec tests:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/specifications/commit/99ef4e71c68811912da49b451408764eba73015c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/commit/99ef4e71c68811912da49b451408764eba73015c&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The reference implementation for this change is provided by the Python driver and is in code review now.&lt;/p&gt;</description>
                <environment></environment>
        <key id="555804">CSHARP-2293</key>
            <summary>Implement new count API</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="rathi.gnanasekaran">Rathi Gnanasekaran</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Jun 2018 22:41:07 +0000</created>
                <updated>Sat, 28 Oct 2023 11:49:00 +0000</updated>
                            <resolved>Fri, 22 Jun 2018 12:36:43 +0000</resolved>
                                                    <fixVersion>2.7.0</fixVersion>
                                    <component>Command Operations</component>
                                        <votes>1</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1928566" author="xgen-internal-githook" created="Fri, 22 Jun 2018 12:36:18 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;rstam&apos;, &apos;name&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2293&quot; title=&quot;Implement new count API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2293&quot;&gt;&lt;del&gt;CSHARP-2293&lt;/del&gt;&lt;/a&gt;: Replace Count with CountDocuments in reference documentation.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/ad03b1dd769eb853d1c8ffe4e5f54fdf3a5851fe&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/ad03b1dd769eb853d1c8ffe4e5f54fdf3a5851fe&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1928565" author="xgen-internal-githook" created="Fri, 22 Jun 2018 12:36:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;rstam&apos;, &apos;name&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2293&quot; title=&quot;Implement new count API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2293&quot;&gt;&lt;del&gt;CSHARP-2293&lt;/del&gt;&lt;/a&gt;: Skip some CountDocuments tests on older servers that don&apos;t support aggregate with hint.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/041ed93aff75a58c68d3ed83663dfdeb4a93ff8f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/041ed93aff75a58c68d3ed83663dfdeb4a93ff8f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1928564" author="xgen-internal-githook" created="Fri, 22 Jun 2018 12:36:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;rstam&apos;, &apos;name&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2293&quot; title=&quot;Implement new count API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2293&quot;&gt;&lt;del&gt;CSHARP-2293&lt;/del&gt;&lt;/a&gt;: Implement new count API.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/3556fc9398f7fbdebfc7c266db469941f07b413d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/3556fc9398f7fbdebfc7c266db469941f07b413d&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="555790">DRIVERS-501</issuekey>
        </issuelink>
                            </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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CSHARP-2156</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8d2v:</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>