<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:15:26 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-2506] getMore doesn&apos;t always use same implicit session as find/aggregate/etc.</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-2506</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;The &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sessions spec&lt;/a&gt; says:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When an operation using a session returns a cursor, all subsequent GETMORE commands for that cursor MUST be run using the same session ID.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;mongoc_cursor_t does this when an explicit session is passed in &quot;opts&quot;, but when it uses an implicit session this behavior isn&apos;t guaranteed.&lt;/p&gt;

&lt;p&gt;Our tests passed by accident, because the session pool is LIFO, and in the single-threaded case it usually only has one lsid anyway:&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;cursor = mongoc_collection_find_with_opts (...);&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;mongoc_cursor_next (...); /* acquire and release implicit session */&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;mongoc_cursor_next (...); /* acquire and release SAME implicit session */&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;However, if another session were pushed into the pool between the initial &quot;find&quot; and the first &quot;getMore&quot;, or between any pair of subsequence getMores, then its new lsid would be used for the next &quot;getMore&quot; instead. If auth is enabled, this will result in a server error code 13, &quot;Cursor session id  is not the same as the operation context&apos;s session id&quot;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="497494">CDRIVER-2506</key>
            <summary>getMore doesn&apos;t always use same implicit session as find/aggregate/etc.</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="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="jesse@mongodb.com">A. Jesse Jiryu Davis</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Feb 2018 21:14:57 +0000</created>
                <updated>Sat, 28 Oct 2023 11:30:07 +0000</updated>
                            <resolved>Thu, 15 Feb 2018 16:46:05 +0000</resolved>
                                    <version>1.9.0</version>
                                    <fixVersion>1.9.3</fixVersion>
                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1821405" author="xgen-internal-githook" created="Fri, 2 Mar 2018 17:39:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2506&quot; title=&quot;getMore doesn&amp;#39;t always use same implicit session as find/aggregate/etc.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2506&quot;&gt;&lt;del&gt;CDRIVER-2506&lt;/del&gt;&lt;/a&gt; a cursor always uses the same lsid&lt;br/&gt;
Branch: debian&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/afc62d1383c7efbf35ac5d237957e578ea546b33&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/afc62d1383c7efbf35ac5d237957e578ea546b33&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1821400" author="xgen-internal-githook" created="Fri, 2 Mar 2018 17:38:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2506&quot; title=&quot;getMore doesn&amp;#39;t always use same implicit session as find/aggregate/etc.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2506&quot;&gt;&lt;del&gt;CDRIVER-2506&lt;/del&gt;&lt;/a&gt; a cursor always uses the same lsid&lt;br/&gt;
Branch: r1.9-dfsg&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/afc62d1383c7efbf35ac5d237957e578ea546b33&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/afc62d1383c7efbf35ac5d237957e578ea546b33&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1807201" author="xgen-internal-githook" created="Thu, 15 Feb 2018 18:58:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2506&quot; title=&quot;getMore doesn&amp;#39;t always use same implicit session as find/aggregate/etc.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2506&quot;&gt;&lt;del&gt;CDRIVER-2506&lt;/del&gt;&lt;/a&gt; a cursor always uses the same lsid&lt;br/&gt;
Branch: r1.9&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/afc62d1383c7efbf35ac5d237957e578ea546b33&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/afc62d1383c7efbf35ac5d237957e578ea546b33&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1806920" author="xgen-internal-githook" created="Thu, 15 Feb 2018 16:45:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2506&quot; title=&quot;getMore doesn&amp;#39;t always use same implicit session as find/aggregate/etc.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2506&quot;&gt;&lt;del&gt;CDRIVER-2506&lt;/del&gt;&lt;/a&gt; a cursor always uses the same lsid&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Conflicts:&lt;/li&gt;
	&lt;li&gt;src/mongoc/mongoc-cmd.c&lt;br/&gt;
Branch: r1.9&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/2283e83972724e33b4ff605f1de6405240c8be28&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/2283e83972724e33b4ff605f1de6405240c8be28&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="1806840" author="xgen-internal-githook" created="Thu, 15 Feb 2018 15:56:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2506&quot; title=&quot;getMore doesn&amp;#39;t always use same implicit session as find/aggregate/etc.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2506&quot;&gt;&lt;del&gt;CDRIVER-2506&lt;/del&gt;&lt;/a&gt; a cursor always uses the same lsid&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/45f3c49f81f15459a74de82e543bd4b61f574d5a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/45f3c49f81f15459a74de82e543bd4b61f574d5a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1805078" author="jesse" created="Tue, 13 Feb 2018 23:32:19 +0000"  >&lt;p&gt;Yes I think it will.&lt;/p&gt;</comment>
                            <comment id="1805058" author="jmikola@gmail.com" created="Tue, 13 Feb 2018 23:11:09 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt;: Will this be backported to 1.9.x? It seems like something we&apos;d want to address in PHPC 1.4.1, since most users will be using implicit sessions on MongoDB 3.6.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                                                <inwardlinks description="is caused by">
                                        <issuelink>
            <issuekey id="478775">CDRIVER-2449</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="518921">PHPC-1152</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hths87:</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>