<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:15:20 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-70131] setFeatureCompatabilityVersion() causes local transactions to be aborted</title>
                <link>https://jira.mongodb.org/browse/SERVER-70131</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The execution of the setFCV command includes the &lt;a href=&quot;https://github.com/10gen/mongo/blob/19515cea589979e7243ccf101a375a3c63881a27/src/mongo/db/op_observer/fcv_op_observer.cpp#L74-L79&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;interruption of sessions&lt;/a&gt; involving nodes with different binary versions - and causes the abortion of any ongoing transaction associated.&lt;/p&gt;

&lt;p&gt;It has been observed that transactions running on a local client (such as &lt;a href=&quot;https://github.com/10gen/mongo/blob/19515cea589979e7243ccf101a375a3c63881a27/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp#L215-L227&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the one&lt;/a&gt; introduced with &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-68926&quot; title=&quot;Store placement changes into config.placementHistory when a createDatabase() command gets committed on the config server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-68926&quot;&gt;&lt;del&gt;SERVER-68926&lt;/del&gt;&lt;/a&gt;) are also interrupted.&lt;/p&gt;

&lt;p&gt;The objective of this ticket is &lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;to confirm whether local transactions need to be interrupted while serving a setFCV command - and if not, modify the code to avoid that.&lt;/li&gt;
	&lt;li&gt;act accordingly on the &lt;tt&gt;TODO&lt;/tt&gt; comments in the source code that reference this ticket&lt;/li&gt;
&lt;/ul&gt;

</description>
                <environment></environment>
        <key id="2148759">SERVER-70131</key>
            <summary>setFeatureCompatabilityVersion() causes local transactions to be aborted</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="adrian.gonzalez@mongodb.com">Adrian Gonzalez Montemayor</assignee>
                                    <reporter username="paolo.polato@mongodb.com">Paolo Polato</reporter>
                        <labels>
                            <label>sharding-nyc-subteam1</label>
                    </labels>
                <created>Fri, 30 Sep 2022 11:56:01 +0000</created>
                <updated>Wed, 11 Jan 2023 20:04:10 +0000</updated>
                            <resolved>Wed, 11 Jan 2023 20:04:10 +0000</resolved>
                                                                    <component>Replication</component>
                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5107058" author="JIRAUSER1260495" created="Wed, 11 Jan 2023 20:04:10 +0000"  >&lt;p&gt;Not aborting transactions would cause setFCV to wait for the global S lock while ongoing transactions (uncommitted) are taking place (transactions take the IX lock). This would then stall all other operations in the system and enqueue them behind the FCV change.&lt;/p&gt;

&lt;p&gt;For this reason we decided to not complete this ticket.&lt;/p&gt;</comment>
                            <comment id="5106629" author="xgen-internal-githook" created="Wed, 11 Jan 2023 17:27:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Adrian Gonzalez&apos;, &apos;email&apos;: &apos;adriangonzalezmontemayor@gmail.com&apos;, &apos;username&apos;: &apos;adriangzz&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-70131&quot; title=&quot;setFeatureCompatabilityVersion() causes local transactions to be aborted&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-70131&quot;&gt;&lt;del&gt;SERVER-70131&lt;/del&gt;&lt;/a&gt; Remove comment about todo since wont fix&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d65e291d0bbf97b60e97203b446c3d309dfbb606&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d65e291d0bbf97b60e97203b446c3d309dfbb606&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4964471" author="renctan" created="Tue, 8 Nov 2022 18:58:25 +0000"  >&lt;p&gt;Had a discussion with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn@mongodb.com&quot;&gt;max.hirschhorn@mongodb.com&lt;/a&gt; and then it came to the discussion why we kill transactions and not normal operations. It looks like the setFCV abort transaction logic was put as a safety precaution for certain older version, but we kept the logic around. I think we can remove it.&lt;/p&gt;</comment>
                            <comment id="4900112" author="JIRAUSER1259531" created="Thu, 13 Oct 2022 07:56:32 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn@mongodb.com&quot;&gt;max.hirschhorn@mongodb.com&lt;/a&gt;, Thanks for the thorough explanation. Yes, BF-26501 was the failure that led to the creation of this ticket (I have updated the ticket accordingly).&lt;/p&gt;</comment>
                            <comment id="4898024" author="max.hirschhorn@10gen.com" created="Wed, 12 Oct 2022 14:39:30 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=paolo.polato%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;paolo.polato@mongodb.com&quot;&gt;paolo.polato@mongodb.com&lt;/a&gt;, do you have server logs and a resmoke invocation to reproducing this problem? Is it BF-26501?&lt;/p&gt;

&lt;p&gt;The code you linked to for the feature compatibility version changing to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/19515cea589979e7243ccf101a375a3c63881a27/src/mongo/db/op_observer/fcv_op_observer.cpp#L74-L79&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;call ServiceEntryPoint::endAllSessions()&lt;/a&gt; is about transport::Session meaning there is a network connection associated with the &lt;tt&gt;Client&lt;/tt&gt; object. &lt;a href=&quot;https://github.com/mongodb/mongo/blob/19515cea589979e7243ccf101a375a3c63881a27/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp#L215-L227&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;A withTransaction() block&lt;/a&gt; running on behalf of an internal thread wouldn&apos;t have a transport::Session associated with it.&lt;/p&gt;

&lt;p&gt;What may be happening instead is that the local replica set transaction got started prior to the FCV downgrade and then was interrupted due to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/19515cea589979e7243ccf101a375a3c63881a27/src/mongo/db/op_observer/fcv_op_observer.cpp#L91-L101&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the killSessionsAbortUnpreparedTransactions() logic&lt;/a&gt;. I would have expected the killing to result in a transient transaction error such that the client (including an internal thread using withTransaction()) would retry automatically. However, my mental model may be inaccurate because &lt;a href=&quot;https://github.com/mongodb/mongo/blob/19515cea589979e7243ccf101a375a3c63881a27/src/mongo/db/session/session_catalog.cpp#L404&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ObservableSession::kill() calls through to ServiceContext::killOperation()&lt;/a&gt; which calls through to OperationContext::markKilled(ErrorCodes::Interrupted).&lt;/p&gt;

&lt;p&gt;I wonder if the reason we hadn&apos;t see this be a problem for external clients is because the network connection will be closed before their OperationContext is interrupted?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25134"><![CDATA[Sharding NYC]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 6 Oct 2022 09:51:41 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 4 weeks 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>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>adrian.gonzalez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 4 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>150.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>adrian.gonzalez@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
            <customfieldvalue>paolo.polato@mongodb.com</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1cazr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hraf50:br</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="6355">Sharding NYC 2022-12-26</customfieldvalue>
    <customfieldvalue id="6356">Sharding NYC 2023-01-09</customfieldvalue>
    <customfieldvalue id="6865">Sharding NYC 2023-01-23</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </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|i1bx53:</customfieldvalue>

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