<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:37:04 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-34557] Allow running transactions against primaries with readPreferences other than &apos;primary&apos;</title>
                <link>https://jira.mongodb.org/browse/SERVER-34557</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We want to restrict transactions to only run on primaries.  The way &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33580&quot; title=&quot;Restrict multi-statement transactions to primaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33580&quot;&gt;&lt;del&gt;SERVER-33580&lt;/del&gt;&lt;/a&gt; accomplished that was by restricting them to only work if the readPreference provided was &apos;primary&apos;.  Drivers, however, may send &apos;primaryPreferred&apos; when connected to a primary via a direct connection.&lt;/p&gt;

&lt;p&gt;We should undo the server changes from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33580&quot; title=&quot;Restrict multi-statement transactions to primaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33580&quot;&gt;&lt;del&gt;SERVER-33580&lt;/del&gt;&lt;/a&gt;, and instead change the checkCanServeReadsFor method in ReplicationCoordinator to return false if the node is not currently primary and we&apos;re in a transaction.&lt;/p&gt;</description>
                <environment></environment>
        <key id="530642">SERVER-34557</key>
            <summary>Allow running transactions against primaries with readPreferences other than &apos;primary&apos;</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="william.schultz@mongodb.com">William Schultz</assignee>
                                    <reporter username="spencer@mongodb.com">Spencer Brody</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Apr 2018 22:19:35 +0000</created>
                <updated>Sun, 29 Oct 2023 22:32:35 +0000</updated>
                            <resolved>Wed, 2 May 2018 17:31:17 +0000</resolved>
                                                    <fixVersion>4.0.0-rc0</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="2473977" author="xgen-internal-githook" created="Wed, 9 Oct 2019 15:27:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;jasonjhchan&apos;, &apos;email&apos;: &apos;jason.chan@mongodb.com&apos;, &apos;name&apos;: &apos;Jason Chan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34557&quot; title=&quot;Allow running transactions against primaries with readPreferences other than &amp;#39;primary&amp;#39;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34557&quot;&gt;&lt;del&gt;SERVER-34557&lt;/del&gt;&lt;/a&gt; last_vote.js needs to wait for stable node before reading oplog&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 381acc4baa6d5f730fb77be5acc39f8473a16b88)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34557&quot; title=&quot;Allow running transactions against primaries with readPreferences other than &amp;#39;primary&amp;#39;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34557&quot;&gt;&lt;del&gt;SERVER-34557&lt;/del&gt;&lt;/a&gt; Make sure slave_delay_clean_shutdown.js awaits secondary nodes before&lt;br/&gt;
reading from oplog after restarting node&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 978ee4b254f75351006648577f1e0fd3673ee412)&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2b9354fd6fddc70aecfcaf3dc53593df203248b8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2b9354fd6fddc70aecfcaf3dc53593df203248b8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2436973" author="jason.chan" created="Fri, 27 Sep 2019 18:40:13 +0000"  >&lt;p&gt;The bug fixes in this ticket should be backported to v3.6:&lt;br/&gt;
 &lt;a href=&quot;https://github.com/mongodb/mongo/commit/381acc4baa6d5f730fb77be5acc39f8473a16b88&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/381acc4baa6d5f730fb77be5acc39f8473a16b88&lt;/a&gt;&lt;br/&gt;
 and&lt;br/&gt;
 &lt;a href=&quot;https://github.com/mongodb/mongo/commit/978ee4b254f75351006648577f1e0fd3673ee412&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/978ee4b254f75351006648577f1e0fd3673ee412&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Filed &lt;ins&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43708&quot; title=&quot;Wait for nodes to become secondary in last_vote.js and slave_delay_clean_shutdown.js&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43708&quot;&gt;&lt;del&gt;SERVER-43708&lt;/del&gt;&lt;/a&gt;&lt;/ins&gt;&#160;to make it not look like we are backporting the entirety of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34557&quot; title=&quot;Allow running transactions against primaries with readPreferences other than &amp;#39;primary&amp;#39;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34557&quot;&gt;&lt;del&gt;SERVER-34557&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1882564" author="xgen-internal-githook" created="Fri, 4 May 2018 02:08:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;william.schultz@mongodb.com&apos;, &apos;name&apos;: &apos;William Schultz&apos;, &apos;username&apos;: &apos;will62794&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34557&quot; title=&quot;Allow running transactions against primaries with readPreferences other than &amp;#39;primary&amp;#39;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34557&quot;&gt;&lt;del&gt;SERVER-34557&lt;/del&gt;&lt;/a&gt; last_vote.js needs to wait for stable node before reading oplog&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/381acc4baa6d5f730fb77be5acc39f8473a16b88&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/381acc4baa6d5f730fb77be5acc39f8473a16b88&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1881215" author="xgen-internal-githook" created="Wed, 2 May 2018 23:53:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;william.schultz@mongodb.com&apos;, &apos;name&apos;: &apos;William Schultz&apos;, &apos;username&apos;: &apos;will62794&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34557&quot; title=&quot;Allow running transactions against primaries with readPreferences other than &amp;#39;primary&amp;#39;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34557&quot;&gt;&lt;del&gt;SERVER-34557&lt;/del&gt;&lt;/a&gt; Make sure slave_delay_clean_shutdown.js awaits secondary nodes before&lt;br/&gt;
reading from oplog after restarting node&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/978ee4b254f75351006648577f1e0fd3673ee412&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/978ee4b254f75351006648577f1e0fd3673ee412&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1880731" author="william.schultz" created="Wed, 2 May 2018 17:33:46 +0000"  >&lt;p&gt;With this change, transactions should now only be allowed to run against a replica set primary, but with any read preference that is supported on primary. We no longer explicitly take the read preference into account when determining whether a transaction is allowed to execute. We instead directly check the replication member state for that node i.e. &lt;tt&gt;PRIMARY, SECONDARY&lt;/tt&gt;, etc.&lt;/p&gt;</comment>
                            <comment id="1880719" author="xgen-internal-githook" created="Wed, 2 May 2018 17:28:54 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;william.schultz@mongodb.com&apos;, &apos;name&apos;: &apos;William Schultz&apos;, &apos;username&apos;: &apos;will62794&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34557&quot; title=&quot;Allow running transactions against primaries with readPreferences other than &amp;#39;primary&amp;#39;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34557&quot;&gt;&lt;del&gt;SERVER-34557&lt;/del&gt;&lt;/a&gt; Restrict transactions to only run against replica set primaries&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e8fe32029aded4d0e909f531196edff43c96cfff&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e8fe32029aded4d0e909f531196edff43c96cfff&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1875667" author="behackett" created="Thu, 26 Apr 2018 22:15:38 +0000"  >&lt;p&gt;Not just &apos;primaryPreferred&apos;, that&apos;s the case with OP_MSG. With OP_QUERY we set the slaveOk wire protocol bit, which the server translates to &apos;secondaryPreferred.&apos;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="945953">SERVER-43708</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="606648">SERVER-37189</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="729701">SERVER-40473</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="504209">SERVER-33580</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>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15141"><![CDATA[v3.6]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 25 Apr 2018 21:10:12 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 18 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-718</customfieldvalue>
                        </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>luke.bonanomi@mongodb.com</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>bernie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jason.chan@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
            <customfieldvalue>william.schultz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htvui7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hthren:</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="2260">Repl 2018-05-07</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|htvgqf:</customfieldvalue>

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