<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:48:59 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-82353] Multi-document transactions can miss documents when movePrimary runs concurrently</title>
                <link>https://jira.mongodb.org/browse/SERVER-82353</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Consider a multi-document transaction with readConcern=snapshot (without atClusterTIme provided by the client) involving an unsharded collection, and the following interleaving:&lt;/p&gt;

&lt;p&gt;1. Mongos &lt;a href=&quot;https://github.com/mongodb/mongo/blob/76b783238987d735aa49b3ed3e21600a152d9031/src/mongo/s/commands/strategy.cpp#L210&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;chooses&lt;/a&gt; the &apos;atClusterTime&apos; at which the transaction will run. Let&apos;s say it choses TS100.&lt;br/&gt;
2. Concurrently, a movePrimary executes. The recipient finishes cloning documents at TS200, and the operation commits at TS210.&lt;br/&gt;
3. MovePrimary finishes and mongos becomes aware of the new db-primary shard. &lt;br/&gt;
4. Now mongos proceed with routing the transaction statement to the new primary, but with atClusterTime=TS100.&lt;br/&gt;
5. On the shard, the databaseVersion check will pass, but the transaction will execute with a data snapshot @TS100, so it won&apos;t see the documents.&lt;/p&gt;

&lt;p&gt;This can cause reads to not see the expected data, and writes to not modify the expected documents.&lt;/p&gt;

&lt;p&gt;Edit: A similar bug can occur with readConcerns other than snapshot. For instance, consider initially shard1 owns dbA, and shard2 owns dbB:&lt;br/&gt;
1. Mongos targets a first transaction statement for dbA to shard1. This opens a snapshot at T100 on that shard.&lt;br/&gt;
2. MovePrimary moves dbB to shard1, which commits at T200.&lt;br/&gt;
3. Mongos targets a second statement for dbB to shard1. DatabaseVersion check passes, but the snapshot used by the transaction on shard1 does not contain the expected data for dbB.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2480026">SERVER-82353</key>
            <summary>Multi-document transactions can miss documents when movePrimary runs concurrently</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="13201">Fixed</resolution>
                                        <assignee username="jordi.serra-torrens@mongodb.com">Jordi Serra Torrens</assignee>
                                    <reporter username="jordi.serra-torrens@mongodb.com">Jordi Serra Torrens</reporter>
                        <labels>
                            <label>car-qw</label>
                    </labels>
                <created>Fri, 20 Oct 2023 15:25:36 +0000</created>
                <updated>Thu, 8 Feb 2024 00:13:59 +0000</updated>
                            <resolved>Tue, 23 Jan 2024 10:28:37 +0000</resolved>
                                    <version>4.2.0</version>
                    <version>4.4.0</version>
                    <version>5.0.0</version>
                    <version>6.0.0</version>
                    <version>7.0.0</version>
                                    <fixVersion>7.2.1</fixVersion>
                    <fixVersion>7.3.0-rc0</fixVersion>
                    <fixVersion>7.0.6</fixVersion>
                    <fixVersion>6.0.14</fixVersion>
                                                        <votes>0</votes>
                                    <watches>18</watches>
                                                                                                                <comments>
                            <comment id="6077329" author="xgen-internal-githook" created="Thu, 8 Feb 2024 00:13:59 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Jordi Serra Torrens&apos;, &apos;email&apos;: &apos;jordi.serra-torrens@mongodb.com&apos;, &apos;username&apos;: &apos;jordist&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-82353&quot; title=&quot;Multi-document transactions can miss documents when movePrimary runs concurrently&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-82353&quot;&gt;&lt;del&gt;SERVER-82353&lt;/del&gt;&lt;/a&gt; Detect placement conflicts in multi-document transactions due to move primary (#17826)&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 7c91dbccd67012a190c44ad801255c64eb54885d)&lt;br/&gt;
Branch: v7.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f003cf74df75f5420acecbdc44157a50cd6c1db6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f003cf74df75f5420acecbdc44157a50cd6c1db6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="6059728" author="xgen-internal-githook" created="Thu, 1 Feb 2024 16:29:20 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Jordi Serra Torrens&apos;, &apos;email&apos;: &apos;jordist@users.noreply.github.com&apos;, &apos;username&apos;: &apos;jordist&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-82353&quot; title=&quot;Multi-document transactions can miss documents when movePrimary runs concurrently&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-82353&quot;&gt;&lt;del&gt;SERVER-82353&lt;/del&gt;&lt;/a&gt; Detect placement conflicts in multi-document transactions due to move primary (#18271)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: 21fe3bc7470f7da95de7d589db9e328e63bf829b&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ef59fc55dc476e36f44b10d77e6af43bcd237249&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ef59fc55dc476e36f44b10d77e6af43bcd237249&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="6034974" author="xgen-internal-githook" created="Tue, 23 Jan 2024 17:03:42 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Jordi Serra Torrens&apos;, &apos;email&apos;: &apos;jordi.serra-torrens@mongodb.com&apos;, &apos;username&apos;: &apos;jordist&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-82353&quot; title=&quot;Multi-document transactions can miss documents when movePrimary runs concurrently&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-82353&quot;&gt;&lt;del&gt;SERVER-82353&lt;/del&gt;&lt;/a&gt; Detect placement conflicts in multi-document transactions due to move primary (#17826)&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 7c91dbccd67012a190c44ad801255c64eb54885d)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: f182850a582dfa472e8d6aa83396dbe7391a33d9&lt;br/&gt;
Branch: v7.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/eba66bd4d7b4185e7af2bccb9df3966dda45faf2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/eba66bd4d7b4185e7af2bccb9df3966dda45faf2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="6033708" author="xgen-internal-githook" created="Tue, 23 Jan 2024 10:26:01 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Jordi Serra Torrens&apos;, &apos;email&apos;: &apos;jordist@users.noreply.github.com&apos;, &apos;username&apos;: &apos;jordist&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-82353&quot; title=&quot;Multi-document transactions can miss documents when movePrimary runs concurrently&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-82353&quot;&gt;&lt;del&gt;SERVER-82353&lt;/del&gt;&lt;/a&gt; Detect placement conflicts in multi-document transactions due to move primary (#17826)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: 7c91dbccd67012a190c44ad801255c64eb54885d&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b347171d4ed07234a9ec54902ad0132564c54443&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b347171d4ed07234a9ec54902ad0132564c54443&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5795197" author="JIRAUSER1257318" created="Fri, 20 Oct 2023 15:29:38 +0000"  >&lt;p&gt;&lt;del&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-77506&quot; title=&quot;Sharded multi-document transactions can mismatch data and ShardVersion&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-77506&quot;&gt;&lt;del&gt;SERVER-77506&lt;/del&gt;&lt;/a&gt; (more specifically, 4086290c7cee228b9bf53ec0ecc6c7bc48f7e65b) causes this to occur for transactions without an explicit atClusterTime passed by the client. For this reason, the attached repro does not reproduce on versions earlier than v7.0. On all versions, I think this bug can also happen when the client passed an explicit atClusterTime.&lt;/del&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </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="2351256">SERVER-77506</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="492507" name="0001-Repro-SERVER-82353-b.patch" size="2056" author="jordi.serra-torrens@mongodb.com" created="Mon, 27 Nov 2023 17:29:01 +0000"/>
                            <attachment id="484307" name="0001-Repro-SERVER-82353.patch" size="3369" author="jordi.serra-torrens@mongodb.com" created="Fri, 20 Oct 2023 15:26:35 +0000"/>
                    </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>7.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26387"><![CDATA[Catalog and Routing]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26553"><![CDATA[v7.2]]></customfieldvalue>
    <customfieldvalue key="25578"><![CDATA[v7.0]]></customfieldvalue>
    <customfieldvalue key="23470"><![CDATA[v6.0]]></customfieldvalue>
    <customfieldvalue key="21777"><![CDATA[v5.0]]></customfieldvalue>
    <customfieldvalue key="18953"><![CDATA[v4.4]]></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_23577" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>CAR Impact</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25718"><![CDATA[5 BF w/evergreen redness]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 7 Nov 2023 21:18:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 hours, 35 minutes ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/WRITING-16347'>WRITING-16347</a></s>]]></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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></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>xgen-internal-githook</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 hours ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>101.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jordi.serra-torrens@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2x0yf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i2ewic:</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="7888">CAR Team 2023-11-13</customfieldvalue>
    <customfieldvalue id="7889">CAR Team 2023-11-27</customfieldvalue>
    <customfieldvalue id="7890">CAR Team 2023-12-11</customfieldvalue>
    <customfieldvalue id="7891">CAR Team 2023-12-25</customfieldvalue>
    <customfieldvalue id="7892">CAR Team 2024-01-08</customfieldvalue>
    <customfieldvalue id="8006">CAR Team 2024-01-22</customfieldvalue>
    <customfieldvalue id="8007">CAR Team 2024-02-05</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|i2wn3r:</customfieldvalue>

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