<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:33:56 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-33591] Cleanup interaction of write concerns and transactions</title>
                <link>https://jira.mongodb.org/browse/SERVER-33591</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Due to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33223&quot; title=&quot;Add transaction resource stash for snapshot reads&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33223&quot;&gt;&lt;del&gt;SERVER-33223&lt;/del&gt;&lt;/a&gt;, a global WriteUnitOfWork gets established in &lt;tt&gt;unstashTransactionResources()&lt;/tt&gt; if &lt;tt&gt;snapshot&lt;/tt&gt; read concern is specified. This WUOW will commit after running &lt;tt&gt;runCommandImpl()&lt;/tt&gt;. However, waitForWaitConcern happens inside &lt;tt&gt;runCommandImpl()&lt;/tt&gt; and will hit &lt;a href=&quot;https://github.com/mongodb/mongo/blob/22b2b828a922a7459b4e1c75860a11c7eb3db630/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp#L144&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the invariant inside a WUOW&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We need to wait for write concern after committing the WUOW for &lt;tt&gt;commitTransaction&lt;/tt&gt; and &lt;tt&gt;abortTransaction&lt;/tt&gt; commands and disable or ignore write concerns for writes in a transaction.&lt;/p&gt;</description>
                <environment></environment>
        <key id="504340">SERVER-33591</key>
            <summary>Cleanup interaction of write concerns and 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="13201">Fixed</resolution>
                                        <assignee username="siyuan.zhou@mongodb.com">Siyuan Zhou</assignee>
                                    <reporter username="siyuan.zhou@mongodb.com">Siyuan Zhou</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 Mar 2018 21:44:20 +0000</created>
                <updated>Sun, 29 Oct 2023 22:34:17 +0000</updated>
                            <resolved>Thu, 15 Mar 2018 22:58:19 +0000</resolved>
                                                    <fixVersion>3.7.4</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1835906" author="xgen-internal-githook" created="Thu, 15 Mar 2018 22:57:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;siyuan.zhou@mongodb.com&apos;, &apos;name&apos;: &apos;Siyuan Zhou&apos;, &apos;username&apos;: &apos;visualzhou&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33591&quot; title=&quot;Cleanup interaction of write concerns and transactions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33591&quot;&gt;&lt;del&gt;SERVER-33591&lt;/del&gt;&lt;/a&gt; Cleanup interaction of write concerns and transactions&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b762003b0b692fe78658e675f06495f132af442c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b762003b0b692fe78658e675f06495f132af442c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1823998" author="siyuan.zhou@10gen.com" created="Tue, 6 Mar 2018 02:25:00 +0000"  >&lt;p&gt;To make sure &lt;tt&gt;writeForWriteConcern&lt;/tt&gt; can never be called inside the global WUOW, we need to push down the stashing logic as discussed with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=james.wahlin&quot; class=&quot;user-hover&quot; rel=&quot;james.wahlin&quot;&gt;james.wahlin&lt;/a&gt; before his vacation.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;commitTransaction&lt;/tt&gt; will commit the WUOW and transaction abort for whatever reason will leave the WUOW to the destructor, but we will stash the WUOW if any non-abort error is thrown, e.g. parsing errors. In the error cases, we generally allow clients to wait for writeConcern. Thus it makes more sense to make the writeForWriteConcern orthogonal to transaction by waiting outside the global WUOW.&lt;/p&gt;</comment>
                            <comment id="1821956" author="siyuan.zhou@10gen.com" created="Fri, 2 Mar 2018 22:28:44 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=spencer&quot; class=&quot;user-hover&quot; rel=&quot;spencer&quot;&gt;spencer&lt;/a&gt;, as mentioned in the description, waitForWaitConcern is called inside a WUOW and hits an invariant in transaction.&lt;/p&gt;</comment>
                            <comment id="1821892" author="spencer" created="Fri, 2 Mar 2018 21:45:32 +0000"  >&lt;p&gt;Is there anything to do to support writeConcern on commitTransaction?  I&apos;d expect it to just work after &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33216&quot; title=&quot;Commit transaction and generate applyOps oplog entry in commitTransaction command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33216&quot;&gt;&lt;del&gt;SERVER-33216&lt;/del&gt;&lt;/a&gt; is completed&lt;/p&gt;</comment>
                            <comment id="1820856" author="siyuan.zhou@10gen.com" created="Fri, 2 Mar 2018 08:17:49 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=spencer&quot; class=&quot;user-hover&quot; rel=&quot;spencer&quot;&gt;spencer&lt;/a&gt;, this ticket is also for supporting write concern of commitTransaction, which isn&apos;t covered by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33412&quot; title=&quot;Error on writes with unsupported transaction options&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33412&quot;&gt;&lt;del&gt;SERVER-33412&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="500370">SERVER-33412</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.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>Fri, 2 Mar 2018 21:45:32 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 47 weeks, 6 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_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>
                            5 years, 47 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>siyuan.zhou@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htrh4v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htivc7:</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="2186">Repl 2018-03-26</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|htr3bb:</customfieldvalue>

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