<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:03:34 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>[JAVA-5030] BulkOperations UpdateOne with list of Query and Update throws WriteConflict Error</title>
                <link>https://jira.mongodb.org/browse/JAVA-5030</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;While doing BulkOperations update, mongoDB throws WriteConflict error&lt;/p&gt;

&lt;p&gt;BulkOperations bulkOperations = mongoTemplate.bulkOps(BulkOperations.BulkMode.ORDERED, CollectionConstants.COLLECTION_NAME_EQD_FIXING_AUDIT);&lt;br/&gt;
bulkOperations.updateOne(queryUpdates);&lt;br/&gt;
bulkOperations.execute();&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: Here queryUpdates are List&amp;lt;Pair&amp;lt;Query, Update&amp;gt;&amp;gt;. Query object has ObjectId of the documents and all the 30k Query has unique ObjectId&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Error&lt;/b&gt;:&lt;/p&gt;

&lt;p&gt;Could not commit Mongo transaction for session [ClientSessionImpl@d9d19bd id = {&quot;id&quot;: {&quot;$binary&quot;: &lt;/p&gt;
{&quot;base64&quot;: &quot;vNL284T+Smeq2jcthOulSA==&quot;, &quot;subType&quot;: &quot;04&quot;}
&lt;p&gt;}}, causallyConsistent = true, txActive = false, txNumber = 11, error = d != java.lang.Boolean].; nested exception is com.mongodb.MongoCommandException: Command failed with error 112 (WriteConflict): &apos;WiredTigerRecordStore::insertRecord :: caused by :: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.&apos; on server x01btsypdb1a.vsi.uat.dbs.com:27017. The full response is {&quot;errorLabels&quot;: &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;TransientTransactionError&amp;quot;&amp;#93;&lt;/span&gt;, &quot;ok&quot;: 0.0, &quot;errmsg&quot;: &quot;WiredTigerRecordStore::insertRecord :: caused by :: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.&quot;, &quot;code&quot;: 112, &quot;codeName&quot;: &quot;WriteConflict&quot;, &quot;$clusterTime&quot;: {&quot;clusterTime&quot;: {&quot;$timestamp&quot;: {&quot;t&quot;: 1686888951, &quot;i&quot;: 22173}}, &quot;signature&quot;: {&quot;hash&quot;: {&quot;$binary&quot;: {&quot;base64&quot;: &quot;sIYH92YWxYoaLCjcH8CyjZiHV08=&quot;, &quot;subType&quot;: &quot;00&quot;}}, &quot;keyId&quot;: 7189425660345974791}}, &quot;operationTime&quot;: {&quot;$timestamp&quot;: &lt;/p&gt;
{&quot;t&quot;: 1686888951, &quot;i&quot;: 1}
&lt;p&gt;}}&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2370266">JAVA-5030</key>
            <summary>BulkOperations UpdateOne with list of Query and Update throws WriteConflict Error</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</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="-1">Unassigned</assignee>
                                    <reporter username="javajpn@gmail.com">JayaprakashNarayanan Ramanathan</reporter>
                        <labels>
                    </labels>
                <created>Fri, 16 Jun 2023 09:22:51 +0000</created>
                <updated>Fri, 16 Jun 2023 12:11:59 +0000</updated>
                            <resolved>Fri, 16 Jun 2023 12:11:59 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5504575" author="jeff.yemin" created="Fri, 16 Jun 2023 12:11:40 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=javajpn%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;javajpn@gmail.com&quot;&gt;javajpn@gmail.com&lt;/a&gt;, it looks like you also asked for help on this in the community forum: &lt;a href=&quot;https://www.mongodb.com/community/forums/t/writeconflict-error-while-doing-bulkoperations-update-using-spring-mongodb/231466&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/community/forums/t/writeconflict-error-while-doing-bulkoperations-update-using-spring-mongodb/231466&lt;/a&gt;.  That is a more appropriate place to get free support, as the JAVA project is about reporting bugs or requesting features in the Java driver.&lt;/p&gt;

&lt;p&gt;Other resources you can try, depending on your situation:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Our MongoDB support portal, located at &lt;a href=&quot;https://support.mongodb.com/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;support.mongodb.com&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;If you are an Atlas customer, you can also: Click the in-app chat icon in the lower right corner to chat with a MongoDB Support representative OR Click Support in the left-hand navigation to view Developer Resources.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="5504290" author="dbeng-pm-bot" created="Fri, 16 Jun 2023 09:22:54 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=javajpn%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;javajpn@gmail.com&quot;&gt;javajpn@gmail.com&lt;/a&gt;, thank you for reporting this issue! The team will look into it and get back to you soon. &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1wf0o:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>