<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:57:18 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-63258] Resolve inconsistency around the write to the findAndModify image collection for prepared internal transactions </title>
                <link>https://jira.mongodb.org/browse/SERVER-63258</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;For prepared internal transactions for retryable findAndModify,&#160;the pre/post image&#160;is written to the image collection at prepare time. On the primary the write is done in a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/882ebf1ad73b1c39af8b0cd82de7c648b8a860d2/src/mongo/db/op_observer_impl.cpp#L1725&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;side storage engine transaction&lt;/a&gt;, whereas on secondaries the write is done in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/882ebf1ad73b1c39af8b0cd82de7c648b8a860d2/src/mongo/db/repl/oplog.cpp#L1637-L1648&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the prepared&#160;transaction&apos;s storage engine transaction&lt;/a&gt;. This has caused the primary and secondaries to have inconsistent behaviors:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;On nodes that are secondaries when the transaction enters prepare, the&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/7c60c33a172067cd76b72bdb5b72c7381b3899ef/src/mongo/db/repl/oplog.cpp#L275&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;config.image_collection IX lock&lt;/a&gt;&#160;is held along with other locks acquired for the transaction until the transaction commits or aborts. So if there is failover, step up can hang (to be solved in&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-63071&quot; title=&quot;[Retryability] Prepared internal transactions for retryable findAndModify can cause stepup to hang &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-63071&quot;&gt;&lt;del&gt;SERVER-63071&lt;/del&gt;&lt;/a&gt;).&lt;/li&gt;
	&lt;li&gt;If the transaction aborts after prepare, the image collection on the primary is expected to be inconsistent with the image collection on secondaries. The reason is that when the transaction aborts, the write to image collection only gets rolled back on secondaries.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;To solve this, there are two options:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Make secondaries also write to the image collection in a side storage engine transaction. One challenge here is to determine what timestamp the storage engine transaction should use.&lt;/li&gt;
	&lt;li&gt;Make primary write the image collection in the transaction&#8217;s storage transaction. This would require flipping the order in TransactionParticipant to write the applyOps oplog entries before putting the transaction&#8217;s storage transaction into prepare. It is unclear if this would be safe.&#160;&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="1976785">SERVER-63258</key>
            <summary>Resolve inconsistency around the write to the findAndModify image collection for prepared internal transactions </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="12300">Won&apos;t Do</resolution>
                                        <assignee username="backlog-server-sharding-nyc">[DO NOT USE] Backlog - Sharding NYC</assignee>
                                    <reporter username="cheahuychou.mao@mongodb.com">Cheahuychou Mao</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 Feb 2022 16:51:16 +0000</created>
                <updated>Tue, 6 Dec 2022 00:34:21 +0000</updated>
                            <resolved>Mon, 14 Feb 2022 18:11:36 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4407361" author="xgen-internal-githook" created="Fri, 11 Mar 2022 19:23:50 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Cheahuychou Mao&apos;, &apos;email&apos;: &apos;mao.cheahuychou@gmail.com&apos;, &apos;username&apos;: &apos;cheahuychou&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-63633&quot; title=&quot;Remove TODO listed in SERVER-63258&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-63633&quot;&gt;&lt;del&gt;SERVER-63633&lt;/del&gt;&lt;/a&gt; Remove TODO listed in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-63258&quot; title=&quot;Resolve inconsistency around the write to the findAndModify image collection for prepared internal transactions &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-63258&quot;&gt;&lt;del&gt;SERVER-63258&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/55491b29a47c33aa6875650f4e0a23a831b9cf8a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/55491b29a47c33aa6875650f4e0a23a831b9cf8a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4354098" author="jack.mulrow" created="Mon, 14 Feb 2022 18:16:36 +0000"  >&lt;p&gt;For more context, we don&apos;t believe the current behavior is a bug, just hard to reason about, and we don&apos;t believe we&apos;ll have to change this code in the near future, so addressing this isn&apos;t worth the effort at this time.&lt;/p&gt;</comment>
                            <comment id="4354084" author="ratika.gandhi" created="Mon, 14 Feb 2022 18:11:36 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mindaugas.malinauskas&quot; class=&quot;user-hover&quot; rel=&quot;mindaugas.malinauskas&quot;&gt;mindaugas.malinauskas&lt;/a&gt;, we are closing this ticket but if Query team finds that we need it let us know and we&apos;ll revisit. Thanks!&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1983146">SERVER-63633</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1972894">SERVER-63071</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1967387">SERVER-62785</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>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>Mon, 14 Feb 2022 18:11:36 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 47 weeks, 5 days 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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 47 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-sharding-nyc</customfieldvalue>
            <customfieldvalue>cheahuychou.mao@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jack.mulrow@mongodb.com</customfieldvalue>
            <customfieldvalue>ratika.gandhi@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0j26f:</customfieldvalue>

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

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