<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:24:21 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-1953] Clarify if pinned connections can only be used for a single concurrent transaction when behind load-balancer</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-1953</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;div class=&quot;panel&quot; style=&quot;background-color: #fafbfc;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #fafbfc;&quot;&gt;
&lt;h3&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;In the specification for driver support for running MongoDB behind an L4 load-balancer, we specify connection-pinning rules for distributed transactions to ensure all transaction commands target the same service behind the load balancer. Specifically, we say:&lt;/p&gt;

&lt;p&gt;&quot;When executing a transaction in load balancing mode, drivers MUST follow the rules outlined in&#160;&lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/transactions/transactions.rst#sharded-transactions&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Sharded Transactions&lt;/a&gt;&#160;with one exception: drivers MUST use the same connection for all commands in the transaction &quot;&#160;&lt;/p&gt;

&lt;p&gt;I would like to clarify in the spec whether or not this implies that:&lt;/p&gt;

&lt;p&gt;&quot;drivers MUST NOT use the same connection for two concurrent transactions run under different sessions from the same client&quot;&lt;/p&gt;

&lt;p&gt;In other words, I wonder if the following situation possible:&lt;br/&gt;
(1) Client A begins txn with LSID x and TxnNumber 1; the driver pins connection C to serve this txn&lt;br/&gt;
(2) Client A sends some pieces of txn (x, 1) but doesn&#8217;t commit or abort it yet&lt;br/&gt;
(3) Client A begins txn with LSID y and txnNumber 1&#160;&lt;em&gt;on connection C&lt;/em&gt;, and sends some pieces of it&lt;br/&gt;
(4) Client A commits txn (x, 1)&lt;br/&gt;
(5) Client A commits txn (y, 1)&lt;/p&gt;

&lt;p&gt;I believe the answer is &quot;this is not possible&quot;, which means we could add to the spec a clarification that a pinned connection for a transaction will only run commands for that single transaction until it either commits or aborts.&#160;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;panel&quot; style=&quot;background-color: #fafbfc;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #fafbfc;&quot;&gt;
&lt;h3&gt;&lt;a name=&quot;Motivation&quot;&gt;&lt;/a&gt;&lt;b&gt;Motivation&lt;/b&gt;&lt;/h3&gt;
&lt;h4&gt;&lt;a name=&quot;Whoistheaffectedenduser%3F&quot;&gt;&lt;/a&gt;Who is the affected end user?&lt;/h4&gt;

&lt;p&gt;Adding this to the spec would make the server work for LB support much simpler.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Isthisticketrequiredbyadownstreamteam%3F&quot;&gt;&lt;/a&gt;Is this ticket required by a downstream team?&lt;/h4&gt;

&lt;p&gt;SERVER&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="1898486">DRIVERS-1953</key>
            <summary>Clarify if pinned connections can only be used for a single concurrent transaction when behind load-balancer</summary>
                <type id="14901" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14700&amp;avatarType=issuetype">Spec Change</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="kevin.albertson@mongodb.com">Kevin Albertson</assignee>
                                    <reporter username="george.wangensteen@mongodb.com">George Wangensteen</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Oct 2021 15:15:49 +0000</created>
                <updated>Sat, 28 Oct 2023 10:44:39 +0000</updated>
                            <resolved>Thu, 6 Jan 2022 01:23:23 +0000</resolved>
                                                        <component>Load Balancer</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4277472" author="xgen-internal-githook" created="Wed, 5 Jan 2022 22:32:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Kevin Albertson&apos;, &apos;email&apos;: &apos;kevin.albertson@mongodb.com&apos;, &apos;username&apos;: &apos;kevinAlbs&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-1953&quot; title=&quot;Clarify if pinned connections can only be used for a single concurrent transaction when behind load-balancer&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-1953&quot;&gt;&lt;del&gt;DRIVERS-1953&lt;/del&gt;&lt;/a&gt; LB txns have exclusive connection (#1114)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/specifications/commit/d59c866f33ea408cb7db370226829ee1598b5d43&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/commit/d59c866f33ea408cb7db370226829ee1598b5d43&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4264596" author="kevin.albertson" created="Wed, 22 Dec 2021 19:31:27 +0000"  >&lt;p&gt;Apologies for the slow follow-up.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I believe the answer is &quot;this is not possible&quot;, which means we could add to the spec a clarification that a pinned connection for a transaction will only run commands for that single transaction until it either commits or aborts. &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;After a survey of drivers, the answer is &quot;this is possible&quot; in some drivers but does not agree with the intent of the specification.&lt;/p&gt;

&lt;p&gt;Opened &lt;a href=&quot;https://github.com/mongodb/specifications/pull/1114&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/pull/1114&lt;/a&gt; with the suggested clarification.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1959257">RUBY-2868</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1816800">SERVER-58504</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_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10940"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hzpfqv:</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>