<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:23:39 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>[DRIVERS-1577] Workarounds for killAllSessions in unified test runner</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-1577</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;ActionforDrivers&quot;&gt;&lt;/a&gt;Action for Drivers&lt;/h4&gt;

&lt;p&gt;The unified test format spec clarifies additional error codes that may be ignored when executing &lt;tt&gt;killAllSessions&lt;/tt&gt; to work around &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-54216&quot; title=&quot;killAllSessions produces authorization error while killing own sessions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-54216&quot;&gt;&lt;del&gt;SERVER-54216&lt;/del&gt;&lt;/a&gt; and Atlas prohibiting usage of the command. Additionally, it suggests several approaches to disable &lt;tt&gt;killAllSessions&lt;/tt&gt; behavior for Atlas (e.g. detecting &quot;mongodb.net&quot; hostnames, implementing a configuration option for the test runner).&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;OriginalDescription&quot;&gt;&lt;/a&gt;Original Description&lt;/h4&gt;

&lt;p&gt;Unified test format currently contains the recommendation to kill all sessions before every test:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Terminating Open Transactions&lt;/p&gt;

&lt;p&gt;Open transactions can cause tests to block indiscriminately. Test runners SHOULD terminate all open transactions at the start of a test suite and after each failed test by killing all sessions in the cluster. Using the internal MongoClient, execute the killAllSessions command on either the primary or, if connected to a sharded cluster, all mongos servers.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;killAllSessions command does not work in Atlas (HELP-22193). The closest workaround is killing the user&apos;s own sessions, but this currently doesn&apos;t work due to server bug (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-54216&quot; title=&quot;killAllSessions produces authorization error while killing own sessions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-54216&quot;&gt;&lt;del&gt;SERVER-54216&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Until &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-54216&quot; title=&quot;killAllSessions produces authorization error while killing own sessions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-54216&quot;&gt;&lt;del&gt;SERVER-54216&lt;/del&gt;&lt;/a&gt; is fixed, unified test runners should provide an option to not run killAllSessions at all, and the workload executor should request this option when instantiating the test runner.&lt;/p&gt;

&lt;p&gt;When &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-54216&quot; title=&quot;killAllSessions produces authorization error while killing own sessions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-54216&quot;&gt;&lt;del&gt;SERVER-54216&lt;/del&gt;&lt;/a&gt; is fixed, unified test runners may switch to killing only sessions of their user, at which point the option to not kill sessions may be removed, OR outside of Atlas the test runners could continue killing all sessions but for Atlas testing the test runners would only kill their own sessions.&lt;/p&gt;

&lt;p&gt;Note that killing sessions is not strictly necessary in the test runner unless transactions are actually being used, and currently Atlas planned maintenance tests do not use transactions.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1629969">DRIVERS-1577</key>
            <summary>Workarounds for killAllSessions in unified test runner</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="13453" iconUrl="https://jira.mongodb.org/images/icons/status_generic.gif" description="">Implementing</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="jmikola@mongodb.com">Jeremy Mikola</assignee>
                                    <reporter username="oleg.pudeyev@mongodb.com">Oleg Pudeyev</reporter>
                        <labels>
                    </labels>
                <created>Mon, 22 Feb 2021 19:26:51 +0000</created>
                <updated>Fri, 6 May 2022 14:24:11 +0000</updated>
                                                                <component>Atlas Testing</component>
                    <component>Unified Test Runner</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="3709862" author="xgen-internal-githook" created="Fri, 9 Apr 2021 12:35:42 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeremy Mikola&apos;, &apos;email&apos;: &apos;jmikola@gmail.com&apos;, &apos;username&apos;: &apos;jmikola&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-1577&quot; title=&quot;Workarounds for killAllSessions in unified test runner&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-1577&quot;&gt;DRIVERS-1577&lt;/a&gt; Note caveats for killAllSessions (#952)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/specifications/commit/1b4ce24071065b9c00263939dbb7e9524147c068&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/commit/1b4ce24071065b9c00263939dbb7e9524147c068&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3709243" author="jmikola@gmail.com" created="Thu, 8 Apr 2021 23:52:10 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/specifications/pull/952&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/pull/952&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3704452" author="jmikola@gmail.com" created="Tue, 6 Apr 2021 23:38:35 +0000"  >&lt;p&gt;Follow-up: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andreas.braun&quot; class=&quot;user-hover&quot; rel=&quot;andreas.braun&quot;&gt;andreas.braun&lt;/a&gt; and I spoke about this earlier today and agreed to proceed with amending the unified test runner spec to detect an Atlas connection string and disable &lt;tt&gt;killAllSessions&lt;/tt&gt; accordingly.&lt;/p&gt;</comment>
                            <comment id="3698724" author="jmikola@gmail.com" created="Fri, 2 Apr 2021 15:27:18 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=oleg.pudeyev&quot; class=&quot;user-hover&quot; rel=&quot;oleg.pudeyev&quot;&gt;oleg.pudeyev&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andreas.braun&quot; class=&quot;user-hover&quot; rel=&quot;andreas.braun&quot;&gt;andreas.braun&lt;/a&gt;: If I understand correctly, this isn&apos;t just an issue with Comprehensive Atlas Testing (DRIVERS-828), but also applies to &lt;em&gt;any&lt;/em&gt; testing against an Atlas cluster. For DRIVERS-828, the workload executor is a logical place to configure the test runner (e.g. invoke a &lt;tt&gt;disableKillAllSessions()&lt;/tt&gt; method or otherwise pass an option when instantiating the test runner). But I&apos;d worry a driver&apos;s general test suite might not have a place to do so if the test suite is simply invoked with an arbitrary connection string.&lt;/p&gt;

&lt;p&gt;Would it make more sense to just require the unified test runner to inspect the connection string before it decides to invoke &lt;tt&gt;killAllSessions&lt;/tt&gt; and NOP if it sees an Atlas hosts? I think that could be done by checking for &quot;mongodb.net&quot; in the hostname.&lt;/p&gt;</comment>
                            <comment id="3691026" author="jmikola@gmail.com" created="Tue, 30 Mar 2021 13:38:31 +0000"  >&lt;p&gt;Just spoke with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andreas.braun&quot; class=&quot;user-hover&quot; rel=&quot;andreas.braun&quot;&gt;andreas.braun&lt;/a&gt; about this today. We agreed that test runners would do well to implement some internal API that allows for disabling &lt;tt&gt;killAllSessions&lt;/tt&gt; behavior. This was done for &lt;a href=&quot;https://jira.mongodb.org/browse/PHPLIB-613&quot; title=&quot;Unified test runner changes for Atlas testing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PHPLIB-613&quot;&gt;&lt;del&gt;PHPLIB-613&lt;/del&gt;&lt;/a&gt; and presumably similar to what Ruby and Java had to do in their workload executors.&lt;/p&gt;

&lt;p&gt;Beyond that, we can explore the other two ideas Andreas had above about lazily calling &lt;tt&gt;killAllSessions&lt;/tt&gt; for tests that utilize sessions (before &lt;em&gt;and&lt;/em&gt; after the tests run) and allowing &lt;tt&gt;killAllSessions&lt;/tt&gt; to fail and ignore errors. Note that the first suggestion might not work for all cases since &lt;tt&gt;dropCollection&lt;/tt&gt; may block on a previous lingering transaction &#8211; and in that case, the current test that would block might not utilize sessions at all so the &quot;lazy&quot; check might not trigger.&lt;/p&gt;</comment>
                            <comment id="3648870" author="jmikola@gmail.com" created="Fri, 5 Mar 2021 12:19:00 +0000"  >&lt;p&gt;To confirm, the current language in the unified test format spec was lifted from the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/transactions/tests/README.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;transactions test README&lt;/a&gt;. I believe that the reason the transaction spec test runner instructed calling &lt;tt&gt;killAllSessions&lt;/tt&gt; before the test suite was because we don&apos;t know what state the server is in before starting the test suite, and killing all sessions ensures we have a blank slate.&lt;/p&gt;

&lt;p&gt;That may not be relevant in the case of Atlas driver testing where we&apos;re running workloads (which presently don&apos;t even use transactions) on new clusters.&lt;/p&gt;

&lt;p&gt;One idea &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andreas.braun&quot; class=&quot;user-hover&quot; rel=&quot;andreas.braun&quot;&gt;andreas.braun&lt;/a&gt; and I discussed was shifting the responsibility of killing sessions to the end of each test when the entity map and its resources are destroyed; however, that doesn&apos;t address the issue of inheriting dirty state if the unified tests are run as part of a larger test suite. I &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-54216?focusedCommentId=3648860&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-3648860&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;asked in SERVER-54216&lt;/a&gt; if that bug also applies to &lt;a href=&quot;https://docs.mongodb.com/manual/reference/command/killAllSessionsByPattern/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;killAllSessionsByPattern&lt;/tt&gt;&lt;/a&gt; when using LSID patterns (not user criteria). If not, I would propose that the test runner collects LSIDs of all sessions in the entity map at the end of each test and execute a single &lt;tt&gt;killAllSessionsByPattern&lt;/tt&gt; command to kill them individually.&lt;/p&gt;

&lt;p&gt;Andreas had a few other suggestions:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Have the test runner lazily call &lt;tt&gt;killAllSessions&lt;/tt&gt; when the first session entity in a test is created.&lt;/li&gt;
	&lt;li&gt;Allow &lt;tt&gt;killAllSessions&lt;/tt&gt; to fail and ignore any error (covers the case of Atlas prohibiting the command &lt;em&gt;and&lt;/em&gt; the bug in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-54216&quot; title=&quot;killAllSessions produces authorization error while killing own sessions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-54216&quot;&gt;&lt;del&gt;SERVER-54216&lt;/del&gt;&lt;/a&gt;). This is not mutually exclusive with the first suggestion.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Lastly, I opened &lt;a href=&quot;https://github.com/mongodb/docs/pull/5062&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb/docs#5062&lt;/a&gt; and reported the issue with the current server docs conflicting with the bug in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-54216&quot; title=&quot;killAllSessions produces authorization error while killing own sessions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-54216&quot;&gt;&lt;del&gt;SERVER-54216&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10620">
                    <name>Issue split</name>
                                            <outwardlinks description="split to">
                                        <issuelink>
            <issuekey id="1672392">CDRIVER-3950</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1672393">CXX-2222</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1672394">CSHARP-3534</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1672395">GODRIVER-1949</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1672396">JAVA-4097</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1672398">MOTOR-704</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1672397">NODE-3189</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1672400">PHPLIB-640</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1672399">PYTHON-2636</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1672401">RUBY-2574</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1672402">RUST-733</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1609448">SERVER-54216</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_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10748"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_23952" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Driver Compliance</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<style type='text/css'>
         #scriptField, #scriptField *{
                border: 1px solid black;
            }

            #scriptField{
                border-collapse: collapse;
            }

            #scriptField td {
                text-align: center; /* Center-align text in table cells */
            }

            #scriptField td.key {
                text-align: left; /* Left-align text in the Key column */
            }

            #scriptField a {
                text-decoration: none; /* Remove underlines from links */
                border: none; /* Remove border from links */
            }
            
            /* Add green background color to cells with FixVersion */
            #scriptField td.hasFixVersion {
                background-color: #00FF00; /* Green color code */
            }

            /* Center-align the first row headers */
            #scriptField th {
                text-align: center;
            }
        </style>
<table id='scriptField'>
  <tr>
    <th>Key</th>
    <th>Status/Resolution</th>
    <th>FixVersion</th>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CDRIVER-3950'>CDRIVER-3950</a>
    </td>
    <td>Backlog</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CXX-2222'>CXX-2222</a>
    </td>
    <td>Backlog</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CSHARP-3534'>CSHARP-3534</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>2.13.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/GODRIVER-1949'>GODRIVER-1949</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>1.6.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/JAVA-4097'>JAVA-4097</a>
    </td>
    <td>Won't Fix</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/NODE-3189'>NODE-3189</a>
    </td>
    <td>Gone away</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/MOTOR-704'>MOTOR-704</a>
    </td>
    <td>Duplicate</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PYTHON-2636'>PYTHON-2636</a>
    </td>
    <td>Done</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PHPLIB-640'>PHPLIB-640</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>1.9.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/RUBY-2574'>RUBY-2574</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>2.15.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/RUST-733'>RUST-733</a>
    </td>
    <td>Duplicate</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/SWIFT-1176'>SWIFT-1176</a>
    </td>
    <td>Won't Do</td>
    <td class=''></td>
  </tr>
</table>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>DRIVERS-828</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY22Q3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hreqd3:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="4822">PHP Sprint March 22-26 2021</customfieldvalue>
    <customfieldvalue id="4823">PHP Sprint March 29-2 2021</customfieldvalue>
    <customfieldvalue id="4918">PHP Sprint April 5-9 2021</customfieldvalue>

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