<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:18:33 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>[CDRIVER-3612] mongoc_collection_estimated_document_count should not accept an explicit session</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3612</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;According to the sessions spec, estimatedDocumentCount should not support an explicit session parameter: &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst#new-collection-methods-that-take-an-explicit-session&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst#new-collection-methods-that-take-an-explicit-session&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, I am able to pass one in by appending it to the options &lt;tt&gt;bson_t&lt;/tt&gt; and I&apos;ve confirmed via command monitoring that the id for the session I specified is being used.&lt;/p&gt;

&lt;p&gt;The docs section on sessions also makes it seem like you can use this method in a transaction: &lt;a href=&quot;http://mongoc.org/libmongoc/current/mongoc_collection_estimated_document_count.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongoc.org/libmongoc/current/mongoc_collection_estimated_document_count.html&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1311201">CDRIVER-3612</key>
            <summary>mongoc_collection_estimated_document_count should not accept an explicit session</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="roberto.sanchez@mongodb.com">Roberto Sanchez</assignee>
                                    <reporter username="kaitlin.mahar@mongodb.com">Kaitlin Mahar</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Apr 2020 17:46:02 +0000</created>
                <updated>Sat, 28 Oct 2023 11:28:49 +0000</updated>
                            <resolved>Mon, 29 Jun 2020 20:10:57 +0000</resolved>
                                                    <fixVersion>1.17.0-rc0</fixVersion>
                    <fixVersion>1.17.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3281148" author="xgen-internal-githook" created="Sat, 11 Jul 2020 16:20:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Roberto C. S&#225;nchez&apos;, &apos;email&apos;: &apos;roberto@connexer.com&apos;, &apos;username&apos;: &apos;rcsanchez97&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3612&quot; title=&quot;mongoc_collection_estimated_document_count should not accept an explicit session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3612&quot;&gt;&lt;del&gt;CDRIVER-3612&lt;/del&gt;&lt;/a&gt; do not accept explicit session for collection count&lt;br/&gt;
Branch: r1.17&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/402189f4b5bd76d51e58aaf195e40cf0aa7cb2b2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/402189f4b5bd76d51e58aaf195e40cf0aa7cb2b2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3228904" author="xgen-internal-githook" created="Mon, 29 Jun 2020 20:10:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Roberto C. S&#225;nchez&apos;, &apos;email&apos;: &apos;roberto@connexer.com&apos;, &apos;username&apos;: &apos;rcsanchez97&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3612&quot; title=&quot;mongoc_collection_estimated_document_count should not accept an explicit session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3612&quot;&gt;&lt;del&gt;CDRIVER-3612&lt;/del&gt;&lt;/a&gt; do not accept explicit session for collection count&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/fa7a96ef92d698622b9641e7c3c6a0ca67fb85c7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/fa7a96ef92d698622b9641e7c3c6a0ca67fb85c7&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3226465" author="xgen-internal-githook" created="Fri, 26 Jun 2020 20:54:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Roberto C. S&#225;nchez&apos;, &apos;email&apos;: &apos;roberto@connexer.com&apos;, &apos;username&apos;: &apos;rcsanchez97&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3612&quot; title=&quot;mongoc_collection_estimated_document_count should not accept an explicit session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3612&quot;&gt;&lt;del&gt;CDRIVER-3612&lt;/del&gt;&lt;/a&gt; do not accept explicit session for collection count&lt;br/&gt;
Branch: cdriver-3612&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/721e667e07ddf664d9bec65554409f789b6539fe&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/721e667e07ddf664d9bec65554409f789b6539fe&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3225828" author="kevin.albertson" created="Fri, 26 Jun 2020 15:32:13 +0000"  >&lt;p&gt;Given some new information, I now think we should not be changing the behavior of the deprecated helper &lt;tt&gt;mongoc_collection_count_with_opts&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;There are spec tests that expect the deprecated count helper to accept an explicit session:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/transactions/tests/count.yml&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/transactions/tests/count.yml&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The spec only says that the estimated document count helper should not support an explicit session, and does not say that the deprecated count helpers should be changed in a behavioral backwards breaking way. If we supported an explicit session before, we should probably continue to support an explicit session.&lt;/p&gt;

&lt;p&gt;Other drivers accept a session argument for their deprecated count helpers. See &lt;a href=&quot;https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/collection.py#L1788&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;pymongo&lt;/a&gt; and the &lt;a href=&quot;https://mongodb.github.io/mongo-java-driver/3.12/javadoc/com/mongodb/client/MongoCollection.html#count()&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Java 3.12 driver&lt;/a&gt; deprecated helpers.&lt;/p&gt;

&lt;p&gt;Given all that, I think we should be leaving the deprecated count helper untouched and relying on the server to error.&lt;/p&gt;</comment>
                            <comment id="3205803" author="kevin.albertson" created="Thu, 11 Jun 2020 18:55:48 +0000"  >&lt;p&gt;We should explicitly raise a client side error if we detect an explicit session passed. The deprecated &lt;tt&gt;mongoc_collection_count_with_opts&lt;/tt&gt; appears to accept a session as well, and documents it. It should also reject an explicit session.&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|hx25yn:</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>