<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:23:21 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-72993] Support running bulkWrite commands in internal transactions</title>
                <link>https://jira.mongodb.org/browse/SERVER-72993</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;What we built in PM-2210 was to allow (internal) transactions to opt into storing history for each stmtId and then return the original response if some stmtId is retried. This should work out of the box for bulkWrite as bulkWrite also accepts a vector of stmtIds as its input. If a bulkWrite is executed inside an internal transaction on behalf of a client retryable write request, each op in the bulkWrite should have the same stmtId as its corresponding original write statement. Such bulkWrite may contain additional write statements that are not explicitly requested by a client retryable write command. In that case, we should assign stmtId kUninitializedStmtId (-1) for those auxiliary ops when executing bulkWrite in the internal transaction. Like insert/update/delete, the bulkWrite command will also include an unstable &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8833bf906024b2c3a65e29496a515eeade629a74/src/mongo/db/ops/write_ops.idl#L103-L108&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;retriedStmtIds&lt;/a&gt; field in its response used internally to support retryability when running bulkWrite inside an internal transaction.&lt;/p&gt;

&lt;p&gt;This ticket should make sure the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8833bf906024b2c3a65e29496a515eeade629a74/src/mongo/db/ops/write_ops.idl#L103-L108&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;retriedStmtIds&lt;/a&gt; field is properly used and add tests for running bulkWrite in internal transactions (especially for retryability).&lt;/p&gt;</description>
                <environment></environment>
        <key id="2236218">SERVER-72993</key>
            <summary>Support running bulkWrite commands in 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="2">Won&apos;t Fix</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="lingzhi.deng@mongodb.com">Lingzhi Deng</reporter>
                        <labels>
                            <label>milestone-3</label>
                    </labels>
                <created>Wed, 18 Jan 2023 15:52:48 +0000</created>
                <updated>Fri, 10 Nov 2023 15:49:57 +0000</updated>
                            <resolved>Fri, 10 Nov 2023 15:49:57 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5871217" author="lingzhi.deng" created="Fri, 10 Nov 2023 15:49:57 +0000"  >&lt;p&gt;Retryable timeseries update for bulkWrite already uses the bulkWrite internal txn api so we get test coverage via that.&lt;/p&gt;</comment>
                            <comment id="5393899" author="JIRAUSER1265594" created="Tue, 2 May 2023 13:59:21 +0000"  >&lt;p&gt;I agree that is probably the easiest way to test this&lt;/p&gt;</comment>
                            <comment id="5392391" author="lingzhi.deng" created="Mon, 1 May 2023 21:59:23 +0000"  >&lt;p&gt;Additional, I wonder if we would want to &quot;upgrade&quot; some of the internal transaction API usages (e.g. the ones in fle_crud.cpp) to use the bulkWrite transaction API &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72991&quot; title=&quot;Enhance internal transaction API for bulkWrite&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72991&quot;&gt;&lt;del&gt;SERVER-72991&lt;/del&gt;&lt;/a&gt; built. I think having at least one internal usage of bulkWrite in internal transactions would also be a good way to test the API we built. CC &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=sean.zimmerman%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;sean.zimmerman@mongodb.com&quot;&gt;sean.zimmerman@mongodb.com&lt;/a&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="5392380" author="lingzhi.deng" created="Mon, 1 May 2023 21:53:18 +0000"  >&lt;p&gt;I think &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72988&quot; title=&quot;Retryable bulkWrite on mongod&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72988&quot;&gt;&lt;del&gt;SERVER-72988&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72989&quot; title=&quot;Retryable bulkWrite on mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72989&quot;&gt;&lt;del&gt;SERVER-72989&lt;/del&gt;&lt;/a&gt; will probably make this work out of the box assuming we will attach stmtIds and return retriedStmtIds correctly. I think the bigger lift for this ticket is how we should test this. We have a lot of internal transaction retryability test under &lt;a href=&quot;https://github.com/mongodb/mongo/tree/master/jstests/sharding/internal_txns&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;jstests/sharding/internal_txns&lt;/a&gt;, e.g. &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d32ee090853a65079d5c0b0b311309b918e3c361/jstests/sharding/internal_txns/retryable_writes_retry_in_different_batches.js&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;retryable_writes_retry_in_different_batches.js&lt;/a&gt;. Unless they are covered by our shell method override effort, we should probably add tests there for running bulkWrite in an internal transactions.&lt;/p&gt;</comment>
                    </comments>
                    <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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25128"><![CDATA[Replication]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 2 May 2023 13:59:21 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1452</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>lingzhi.deng@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-repl</customfieldvalue>
            <customfieldvalue>lingzhi.deng@mongodb.com</customfieldvalue>
            <customfieldvalue>sean.zimmerman@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1r4zz:</customfieldvalue>

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

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