<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:39:47 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-56631] Retryable write pre-fetch phase could miss entry from config.transactions when reading from donor secondaries</title>
                <link>https://jira.mongodb.org/browse/SERVER-56631</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/9d601c939bca2a4304dca2d3c8abd195c1f070af/src/mongo/db/repl/session_update_tracker.cpp#L217-L221&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;SessionUpdateTracker::_updateSessionInfo()&lt;/a&gt; is used by secondary oplog application to coalesce multiple updates to the same config.transactions record into a single update of the most recent retryable write statement. After &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47844&quot; title=&quot;Update _setStableTimestampForStorage to set the stable timestamp without using the stable optime candidates set when EMRC=true&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47844&quot;&gt;&lt;del&gt;SERVER-47844&lt;/del&gt;&lt;/a&gt;, majority snapshot of a secondary is allowed to exist somewhere in the middle of a completed batch. So secondary majority reads on config.transactions may not reflect committed retryable writes at that majority commit point.&lt;/p&gt;

&lt;p&gt;For example, we could have a batch on a donor secondary like this:&lt;br/&gt;
TS1 txn1 stmtId 1&lt;br/&gt;
TS2 txn1 stmtId 2&lt;br/&gt;
TS5 txn1 stmtId 3&lt;br/&gt;
TS10 txn1 stmtId 4&lt;br/&gt;
After applying this batch, the secondary does a single update to the config.transaction table using TS10 and the transaction entry will have lastWriteOpTime at 10. When the retryable write pre-fetch phase fetches from the donor secondary, the majority committed snapshot could be at TS5. If that&apos;s the case, reading with TS5 would not see the config.transactions entry written at TS10. Let&apos;s assume the recipient&apos;s startFetchingTimestamp is also TS5, the recipient would then end up missing stmtId 1 and 2 after the migration because the pre-fetch phase misses the transaction record written at TS10. (See also &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-55305&quot; title=&quot;Retryable write may execute more than once if primary had transitioned through rollback to stable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-55305&quot;&gt;&lt;del&gt;SERVER-55305&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-55578&quot; title=&quot;Disallow atClusterTime reads on the config.transactions collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-55578&quot;&gt;&lt;del&gt;SERVER-55578&lt;/del&gt;&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;This ticket should verify this behavior. One idea to fix this is to read with local read concern (which would always at lastApplied/last batch boundary on secondaries) and then wait for the operationTime returned to be majority committed on the donor, similar to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a56d19b3cd567c1fed816f75f358b72fcb88841b/src/mongo/db/repl/tenant_all_database_cloner.cpp#L85-L99&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;what we did on the cloners&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1700958">SERVER-56631</key>
            <summary>Retryable write pre-fetch phase could miss entry from config.transactions when reading from donor secondaries</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="wenbin.zhu@mongodb.com">Wenbin Zhu</assignee>
                                    <reporter username="lingzhi.deng@mongodb.com">Lingzhi Deng</reporter>
                        <labels>
                            <label>pm-1791_non-cloud-blocking</label>
                            <label>pm-1791_other_required</label>
                            <label>post-rc0</label>
                    </labels>
                <created>Tue, 4 May 2021 20:14:16 +0000</created>
                <updated>Sun, 29 Oct 2023 21:54:04 +0000</updated>
                            <resolved>Tue, 8 Jun 2021 22:06:44 +0000</resolved>
                                                    <fixVersion>5.0.0-rc1</fixVersion>
                    <fixVersion>5.1.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4108248" author="JIRAUSER1259052" created="Wed, 6 Oct 2021 19:01:26 +0000"  >&lt;p&gt;Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it&#8217;s been triggered. For more active release information, please keep an eye on #server-release. Thank you!&lt;/p&gt;</comment>
                            <comment id="3867794" author="xgen-internal-githook" created="Wed, 9 Jun 2021 02:28:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Wenbin Zhu&apos;, &apos;email&apos;: &apos;wenbin.zhu@mongodb.com&apos;, &apos;username&apos;: &apos;WenbinZhu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56631&quot; title=&quot;Retryable write pre-fetch phase could miss entry from config.transactions when reading from donor secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56631&quot;&gt;&lt;del&gt;SERVER-56631&lt;/del&gt;&lt;/a&gt; Make sure retryable write pre-fetch phase can see the config.transactions record when committed snapshot is not at batch boundary.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 18f91c4304086b0334d90c1d94a7d3c7225439bf)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/047e62422aeb20f6a5bd476ed970d4deb8235237&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/047e62422aeb20f6a5bd476ed970d4deb8235237&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3867544" author="xgen-internal-githook" created="Tue, 8 Jun 2021 21:48:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Wenbin Zhu&apos;, &apos;email&apos;: &apos;wenbin.zhu@mongodb.com&apos;, &apos;username&apos;: &apos;WenbinZhu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56631&quot; title=&quot;Retryable write pre-fetch phase could miss entry from config.transactions when reading from donor secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56631&quot;&gt;&lt;del&gt;SERVER-56631&lt;/del&gt;&lt;/a&gt; Make sure retryable write pre-fetch phase can see the config.transactions record when committed snapshot is not at batch boundary.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/18f91c4304086b0334d90c1d94a7d3c7225439bf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/18f91c4304086b0334d90c1d94a7d3c7225439bf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3852819" author="JIRAUSER1258790" created="Wed, 2 Jun 2021 00:38:55 +0000"  >&lt;p&gt;I have verified and reproduced this issue, will start working on the fix.&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="1649421">SERVER-55214</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1652773">SERVER-55305</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1660948">SERVER-55578</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1765412">SERVER-57345</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>4.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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="21777"><![CDATA[v5.0]]></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, 2 Jun 2021 00:38:55 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 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_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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1791</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>
                            2 years, 18 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>lingzhi.deng@mongodb.com</customfieldvalue>
            <customfieldvalue>vivian.ge@mongodb.com</customfieldvalue>
            <customfieldvalue>wenbin.zhu@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hz88pr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hyled3:</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="4859">Repl 2021-05-17</customfieldvalue>
    <customfieldvalue id="4860">Repl 2021-05-31</customfieldvalue>
    <customfieldvalue id="5035">Repl 2021-06-14</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|hz7uyv:</customfieldvalue>

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