<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:17:03 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-3070] Do not include lsid in commands if topology does not support sessions</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3070</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;I came across this while researching &lt;a href=&quot;https://evergreen.mongodb.com/version/5ca3e9fb850e612949c16b48&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;test failures&lt;/a&gt; for &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2961&quot; title=&quot;Support Retryable Writes on by Default&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2961&quot;&gt;&lt;del&gt;CDRIVER-2961&lt;/del&gt;&lt;/a&gt;. In &lt;tt&gt;test_bulk_max_msg_size&lt;/tt&gt;, the test suite builds a bulk write around the 48MB message size and I was originally accounting for the &quot;txnNumber&quot; (for &lt;tt&gt;retryWrites=true&lt;/tt&gt;) based on whether a session ID was also being appended. I observed various test failures on standalone environments and ultimately observed that libmongoc was adding &lt;tt&gt;lsid&lt;/tt&gt; to all outgoing commands sent with OP_MSG (unless sessions were unavailable due to lack of crypto). I was able to quickly observe this using APM in the PHP driver with libmongoc 1.13.0, although I expect this issue dates back to 1.9.0 when sessions were introduced.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst#sending-the-session-id-to-the-server-on-all-commands&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Sending the session ID to the server on all commands&lt;/a&gt; only specifies that drivers MUST set the &lt;tt&gt;lsid&lt;/tt&gt; field if a deployment &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst#how-to-check-whether-a-deployment-supports-sessions&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;supports sessions&lt;/a&gt;, but does not explicitly prohibit including &lt;tt&gt;lsid&lt;/tt&gt; otherwise. Interestingly, standalone servers don&apos;t seem to complain about the field and likely ignore it.&lt;/p&gt;

&lt;p&gt;While including the &lt;tt&gt;lsid&lt;/tt&gt; is probably harmless, I&apos;m not sure if we&apos;re missing a chance to raise a client-side error in the event the user is trying to specify an explicit session on an outgoing command and the topology does not support it.&lt;/p&gt;</description>
                <environment></environment>
        <key id="729154">CDRIVER-3070</key>
            <summary>Do not include lsid in commands if topology does not support sessions</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="13202">Works as Designed</resolution>
                                        <assignee username="roberto.sanchez@mongodb.com">Roberto Sanchez</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Apr 2019 18:32:18 +0000</created>
                <updated>Fri, 27 Oct 2023 13:14:12 +0000</updated>
                            <resolved>Tue, 7 Jul 2020 20:08:04 +0000</resolved>
                                    <version>1.9.0</version>
                                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3273278" author="roberto.sanchez" created="Tue, 7 Jul 2020 20:08:04 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jmikola&quot; class=&quot;user-hover&quot; rel=&quot;jmikola&quot;&gt;jmikola&lt;/a&gt; thanks for following up.  I checked with Kevin and with his concurrence I am closing this issue.&lt;/p&gt;</comment>
                            <comment id="3272350" author="jmikola@gmail.com" created="Tue, 7 Jul 2020 15:31:32 +0000"  >&lt;p&gt;Based on resolved spec change for DRIVERS-1230, I think libmongoc is behaving correctly and this may not require any changes. If the standalone is reporting &lt;tt&gt;logicalSessionTimeoutMinutes&lt;/tt&gt;, it does support sessions (obviously that doesn&apos;t extend to transactions, retryable writes).&lt;/p&gt;</comment>
                            <comment id="2365802" author="kevin.albertson" created="Sat, 10 Aug 2019 20:10:11 +0000"  >&lt;p&gt;Now that the sessions spec has spec tests, we should add a spec test to check this behavior. Created SPEC-1410.&lt;/p&gt;

&lt;p&gt;Also, note that fixing this bug will reveal another bug in how options are applied to commands we send: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3303&quot; title=&quot;Some options not applied for OP_MSG without sessions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3303&quot;&gt;&lt;del&gt;CDRIVER-3303&lt;/del&gt;&lt;/a&gt;, so I&apos;m making that a dependency.&lt;/p&gt;</comment>
                            <comment id="2200967" author="jmikola@gmail.com" created="Wed, 3 Apr 2019 18:38:56 +0000"  >&lt;p&gt;Looking into this a bit more, I believe libmongoc thinks the standalone supports sessions because its isMaster response includes &lt;tt&gt;logicalSessionTimeoutMinutes&lt;/tt&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="890513">CDRIVER-3303</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1402786">CDRIVER-3736</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="511498">JAVA-2811</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="687831">CDRIVER-2961</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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|huigmf:</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>