<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:36:36 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>[SERVER-34417] parallelCollectionScan within a session errors under auth</title>
                <link>https://jira.mongodb.org/browse/SERVER-34417</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In Perl driver tests, there is a parallel collection scan test that iterates (serially), the cursors returned by &lt;tt&gt;parallelCollectionScan&lt;/tt&gt;.  Following the drivers sessions spec, the driver creates an implicit session for this command.&lt;/p&gt;

&lt;p&gt;When run against a 3.6.3 replica set &lt;b&gt;without&lt;/b&gt; authentication, the test passes.  When run &lt;b&gt;with&lt;/b&gt; authentication enabled, the test fails with this error message:&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;   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;Cursor session id (f02e04ea-a996-40de-afa5-b71477649231 - Y5mrDaxi8gv8RmdTsQ+1j7fmkr7JUsabhNmXAheU0fg=) is not the same as the operation context&apos;s session id (none)&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></environment>
        <key id="525314">SERVER-34417</key>
            <summary>parallelCollectionScan within a session errors under auth</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="schwerin@mongodb.com">Andy Schwerin</assignee>
                                    <reporter username="david.golden@mongodb.com">David Golden</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Apr 2018 15:13:21 +0000</created>
                <updated>Fri, 1 Jun 2018 02:21:59 +0000</updated>
                            <resolved>Wed, 23 May 2018 15:44:06 +0000</resolved>
                                    <version>3.6.3</version>
                    <version>3.7.3</version>
                                                    <component>Security</component>
                                        <votes>0</votes>
                                    <watches>14</watches>
                                                                                                                <comments>
                            <comment id="1907671" author="behackett" created="Fri, 1 Jun 2018 02:21:59 +0000"  >&lt;p&gt;I think the solution for this in drivers that have a parallelCollectionScan helper that already added a session parameter in 3.6 (e.g. PyMongo) is to not use &lt;em&gt;implicit&lt;/em&gt; sessions in the helper. If the application passes an explicit session we&apos;ll use it for each cursor. That avoids breaking backward compat and fixes the implicit session problem. If executing the cursors in parallel with the same explicit session is a problem we can add a note to the docs for the helper saying that the cursors have to be executed serially when using a session.&lt;/p&gt;</comment>
                            <comment id="1899797" author="shane.harvey" created="Wed, 23 May 2018 17:51:18 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden&quot; class=&quot;user-hover&quot; rel=&quot;david.golden&quot;&gt;david.golden&lt;/a&gt;, when parallel_scan is called with a session, pymongo uses that session for all cursors. This seems to be okay. When parallel_scan is called without a session, pymongo assigns a &lt;b&gt;new&lt;/b&gt; session for each resulting cursor. Iterating the cursor with a different session results in an error when auth is enabled.&lt;/p&gt;</comment>
                            <comment id="1899636" author="david.golden" created="Wed, 23 May 2018 15:48:49 +0000"  >&lt;p&gt;This back and forth got me curious and I looked at the server commit that Kal referenced.  The surprising comment to me was &quot;If the authorization is not on, then we permit anybody to do anything&quot;, which led me to dig deeper into the Perl driver code.  It turns out there was a bug and the session wasn&apos;t being attached properly to the cursor in the parallel scan case.   With the bug fixed, serial use of parallel collection scan cursors under auth works in the Perl driver.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=behackett&quot; class=&quot;user-hover&quot; rel=&quot;behackett&quot;&gt;behackett&lt;/a&gt; can you double check pymongo? Looks OK at the wiring up stage, but the test iterates cursors in parallel, which seems dubious when used with sessions, but I can&apos;t follow the Python idioms in the test to see for sure what&apos;s happening.&lt;/p&gt;

&lt;p&gt;I apologize for not realizing the bug earlier, but it flips this server ticket around: by &lt;b&gt;NOT&lt;/b&gt; validating that a cursor is being iterated on the same session that created it when auth is &lt;b&gt;OFF&lt;/b&gt;, the server is exposing different constraint behavior with and without auth.  Most driver development/testing is done without auth enabled.  Is there a reason why the &quot;no auth&quot; case means &quot;anything goes&quot;?  Should we require cursors to iterate on their creator session in all cases for consistency?&lt;/p&gt;

&lt;p&gt;I also think if parallel scan is not being deprecated, then its use with sessions is going to be a problem eventually anyway once WT supports more than one cursor, since the whole point is to iterate cursors in parallel and thus can&apos;t be done on the same session (as sessions must not be used concurrently).  I think there&apos;s a good argument that parallel scan shouldn&apos;t use sessions anyway until we understand the semantics.&lt;/p&gt;

&lt;p&gt;All that said, I don&apos;t think anything here needs to block 4.0.&lt;/p&gt;</comment>
                            <comment id="1899629" author="schwerin" created="Wed, 23 May 2018 15:43:50 +0000"  >&lt;p&gt;The &lt;tt&gt;parallelCollectionScan&lt;/tt&gt; command is fundamentally incompatible with the current conception of sessions. Specifically, sessions were conceived to represent a sequence of actions, and the purpose of &lt;tt&gt;parallelCollectionScan&lt;/tt&gt;&#160;is to allow for the parallel execution of many actions. The only reason to reconcile the concept of sessions and the &lt;tt&gt;parallelCollectionScan&lt;/tt&gt; command would be to allow a parallelCollectionScan to execute at snapshot isolation, which is presently only available with the use of sessions. I think that&apos;s legitimate future work, but not something that will be quick to fix soon or that can meaningfully backport to 3.6 or 4.0. As such, I&apos;m going to close this ticket &quot;Won&apos;t Fix&quot; and I suggest that the drivers make the mentioned by &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden&quot; class=&quot;user-hover&quot; rel=&quot;david.golden&quot;&gt;david.golden&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1899519" author="kaloian.manassiev" created="Wed, 23 May 2018 14:38:27 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34417?focusedCommentId=1886517&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1886517&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt; - the check for sessions matching was introduced by the Platforms team (and I think for a good cause).&lt;/p&gt;

&lt;p&gt;If this check is not going away, what&apos;s there for the sharding team to do to improve &lt;tt&gt;parallelCollectionScan&lt;/tt&gt;?&lt;/p&gt;</comment>
                            <comment id="1886517" author="kaloian.manassiev" created="Wed, 9 May 2018 00:00:26 +0000"  >&lt;p&gt;The check that cursors must be iterated on the same session as the one which created them was introduced in 3.6 in &lt;a href=&quot;https://github.com/mongodb/mongo/commit/a561f9554d2caea44beb334c9c6e92742981f38d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this commit&lt;/a&gt; as part of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-28343&quot; title=&quot;Enforce that GETMORE operations can only be run under that cursor&amp;#39;s session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-28343&quot;&gt;&lt;del&gt;SERVER-28343&lt;/del&gt;&lt;/a&gt;. It looks like this behaviour is intentional.&lt;/p&gt;

&lt;p&gt;Given that the &lt;tt&gt;parallelCollectionScan&lt;/tt&gt; and MMAPv1 are deprecated, I suspect that this will not be fixed and that users of &lt;tt&gt;parallelCollectionScan&lt;/tt&gt; must be required to so without using sessions.&lt;/p&gt;

&lt;p&gt;Passing this on to the Platforms team to decide what to do with it.&lt;/p&gt;</comment>
                            <comment id="1867039" author="spencer" created="Tue, 17 Apr 2018 21:53:32 +0000"  >&lt;p&gt;FYI &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ian.whalen&quot; class=&quot;user-hover&quot; rel=&quot;ian.whalen&quot;&gt;ian.whalen&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.storch&quot; class=&quot;user-hover&quot; rel=&quot;david.storch&quot;&gt;david.storch&lt;/a&gt; since I believe query owns parallelCollectionScan&lt;/p&gt;</comment>
                            <comment id="1865525" author="greg.mckeon" created="Mon, 16 Apr 2018 18:47:37 +0000"  >&lt;p&gt;Sending to sharding because it&apos;s sessions.&lt;/p&gt;</comment>
                            <comment id="1861474" author="behackett" created="Wed, 11 Apr 2018 15:36:09 +0000"  >&lt;p&gt;I&apos;m seeing a very similar problem. In my case the error only occurs against MongoDB master running with MMAPv1:&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;   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;[2018/04/10 18:21:20.972] OperationFailure: Cannot run getMore on cursor 5301017319798, which was created in session 67677af3-85fd-499c-8763-e7240b5b2340 - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=, in session 28959612-948a-438b-92e5-20e41b091234 - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=&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;&lt;a href=&quot;https://evergreen.mongodb.com/task/mongo_python_driver_tests_storage_engines__python_version~2.7_storage_engine~mmapv1_test_latest_standalone_04de1697cb1f1d877023942f7ce620415ee08b60_18_04_10_00_04_15&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://evergreen.mongodb.com/task/mongo_python_driver_tests_storage_engines__python_version~2.7_storage_engine~mmapv1_test_latest_standalone_04de1697cb1f1d877023942f7ce620415ee08b60_18_04_10_00_04_15&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="529590">SERVER-34525</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="513954">SERVER-33998</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="529609">PYTHON-1529</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="548298">SERVER-35192</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 11 Apr 2018 15:36:09 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 36 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>bernie@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 36 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>bernie@mongodb.com</customfieldvalue>
            <customfieldvalue>david.golden@mongodb.com</customfieldvalue>
            <customfieldvalue>greg.mckeon@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>shane.harvey@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htuxvr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8vcv:</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>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htuk3z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>