<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:46:13 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-37516] Providing readConcern on second transaction statement can corrupt transaction</title>
                <link>https://jira.mongodb.org/browse/SERVER-37516</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We do not allow read concern on transaction statements after the first one. However, we do not &lt;a href=&quot;https://github.com/mongodb/mongo/blob/352fd4700590fcb0adc1f356794bd4c4fa98befe/src/mongo/db/transaction_participant.cpp#L661-L663&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;check for this&lt;/a&gt; until &lt;a href=&quot;https://github.com/mongodb/mongo/blob/96224608367ce73f4eeb97bac9ab59b13987ca64/src/mongo/db/service_entry_point_common.cpp#L394&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;unstashTransactionResources()&lt;/tt&gt;&lt;/a&gt;, which occurs after we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/96224608367ce73f4eeb97bac9ab59b13987ca64/src/mongo/db/service_entry_point_common.cpp#L841&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;wait for read concern&lt;/a&gt;. This is problematic, since providing a read concern a subsequent statement does not abort the transaction, but waiting for read concern has side effects, such as &lt;a href=&quot;https://github.com/mongodb/mongo/blob/96224608367ce73f4eeb97bac9ab59b13987ca64/src/mongo/db/read_concern_mongod.cpp#L293&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;setting the read timestamp of the transaction&lt;/a&gt;, which is used for the &lt;tt&gt;writeConcern&lt;/tt&gt; wait on &lt;tt&gt;commitTransaction&lt;/tt&gt;. This means you could end up with a corrupted transaction.&lt;/p&gt;

&lt;p&gt;This is not a major issue, since drivers and mongos will not send &lt;tt&gt;readConcern&lt;/tt&gt; on subsequent transaction statements.&lt;/p&gt;</description>
                <environment></environment>
        <key id="615740">SERVER-37516</key>
            <summary>Providing readConcern on second transaction statement can corrupt transaction</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="3">Duplicate</resolution>
                                        <assignee username="siyuan.zhou@mongodb.com">Siyuan Zhou</assignee>
                                    <reporter username="tess.avitabile@mongodb.com">Tess Avitabile</reporter>
                        <labels>
                    </labels>
                <created>Mon, 8 Oct 2018 20:55:22 +0000</created>
                <updated>Fri, 9 Nov 2018 22:31:34 +0000</updated>
                            <resolved>Fri, 9 Nov 2018 22:31:34 +0000</resolved>
                                    <version>4.0.3</version>
                    <version>4.1.3</version>
                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2057786" author="tess.avitabile" created="Fri, 9 Nov 2018 22:27:52 +0000"  >&lt;p&gt;Yes, I think the bug went away with your change.&lt;/p&gt;</comment>
                            <comment id="2057730" author="siyuan.zhou@10gen.com" created="Fri, 9 Nov 2018 21:42:37 +0000"  >&lt;p&gt;With pushing down starting transaction to before command execution in&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37179&quot; title=&quot;Wait for specified write concern whenever commitTransaction returns a NoSuchTransaction error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37179&quot;&gt;&lt;del&gt;SERVER-37179&lt;/del&gt;&lt;/a&gt;, waiting for read concern purely depends on users&apos; input. The side-effect of setting read timestamp is also pushed down to &lt;tt&gt;unstashTransaction&lt;/tt&gt;, so waiting for read concern has no impact on the transaction state. Besides, snapshot read concern is only allowed when &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/service_entry_point_common.cpp#L686-L694&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;startTransaction: true&lt;/tt&gt; is specified&lt;/a&gt; in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37179&quot; title=&quot;Wait for specified write concern whenever commitTransaction returns a NoSuchTransaction error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37179&quot;&gt;&lt;del&gt;SERVER-37179&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If a user specifies the read concern and &lt;tt&gt;startTransaction&lt;/tt&gt;&#160;for the second command, we&apos;ll still find it later when starting the transaction as described above. However, it shouldn&apos;t have any side-effect and should be rare since drivers and mongos won&apos;t do that.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt;, do you think your concerns in the description are addressed by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37179&quot; title=&quot;Wait for specified write concern whenever commitTransaction returns a NoSuchTransaction error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37179&quot;&gt;&lt;del&gt;SERVER-37179&lt;/del&gt;&lt;/a&gt;? If so, I&apos;ll go ahead and close this as a dup.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="606224">SERVER-37179</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="615713">SERVER-37514</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="606224">SERVER-37179</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>2.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 9 Nov 2018 21:42:37 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 13 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>siyuan.zhou@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 13 weeks, 5 days 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>siyuan.zhou@mongodb.com</customfieldvalue>
            <customfieldvalue>tess.avitabile@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu9spb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hu0527:</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="2542">Repl 2018-10-22</customfieldvalue>
    <customfieldvalue id="2543">Repl 2018-11-05</customfieldvalue>
    <customfieldvalue id="2605">Repl 2018-11-19</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|hu9eyn:</customfieldvalue>

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