<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:03: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>[JAVA-4887] GridFS doesn&apos;t support multi-document transactions</title>
                <link>https://jira.mongodb.org/browse/JAVA-4887</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;The MongoDb Java driver appears to not support multi-document transactions;&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;```&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&#160; &#160; &#160; &#160; &#160; &#160; _&lt;em&gt;&#160; &#160; &#160; &#160; &#160; &#160; // _this.getFileObjectService()&lt;/em&gt; is my db service that uses a regular collection&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; _&lt;em&gt;&#160; &#160; &#160; &#160; &#160; &#160; _newId = this.getFileObjectService().add(clientSession, fileObject, interactingEntity);&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160;&#160;__&#160; &#160; &#160; &#160; &#160; &#160;&#160;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;GridFSUploadOptions ops = this.getUploadOps(metadata);&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;String filename = newId.toHexString() + &quot;.&quot; + FilenameUtils.getExtension(metadata.getOrigName());&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160;&#160;__&#160; &#160; &#160; &#160; &#160; &#160;&#160;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;fileObject.setFileName(filename);&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;this.getFileObjectService().update(clientSession, fileObject);&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160;&#160;__&#160; &#160; &#160; &#160; &#160; &#160;&#160;&lt;/p&gt;

&lt;p&gt;//Throws: Command failed with error 263 (OperationNotSupportedInTransaction): &apos;Cannot run &apos;listIndexes&apos; in a multi-document transaction.&apos;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;bucket.uploadFromStream(clientSession, filename, is, ops);&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;```&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;As I am running CRUD operations on regular collections and Gridfs buckets, this error occurs.&lt;/em&gt;&lt;/p&gt;


&lt;p&gt;&lt;em&gt;It feels like a hard requirement to preserve an all-or-nothing approach to data processing in case of errors. For me to not have this fixed means I would have to accept potential inconsistencies in my database.&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Pleaseprovidetheversionofthedriver.Ifapplicable%2CpleaseprovidetheMongoDBserverversionandtopology%28standalone%2Creplicaset%2Corshardedcluster%29.&quot;&gt;&lt;/a&gt;Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).&lt;/h4&gt;

&lt;p&gt;`4.8.2`, what is provided in current Quarkus versions&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;See above; modifying data in a regular collection and then in a gridfs bucket.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;_Determined this was a bug after seeing such posts as &lt;a href=&quot;https://www.mongodb.com/community/forums/t/gridfs-does-not-support-multi-document-transactions/105984_&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/community/forums/t/gridfs-does-not-support-multi-document-transactions/105984_&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2266810">JAVA-4887</key>
            <summary>GridFS doesn&apos;t support multi-document transactions</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="13202">Works as Designed</resolution>
                                        <assignee username="ashni.mehta@mongodb.com">Ashni Mehta</assignee>
                                    <reporter username="contact@gjstewart.net">Greg Stewart</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 Feb 2023 19:55:32 +0000</created>
                <updated>Fri, 27 Oct 2023 13:20:51 +0000</updated>
                            <resolved>Tue, 21 Feb 2023 18:40:22 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5218069" author="JIRAUSER1269884" created="Tue, 21 Feb 2023 19:41:46 +0000"  >&lt;p&gt;Thanks Ashni! Much appreciated!&lt;/p&gt;</comment>
                            <comment id="5217803" author="JIRAUSER1268547" created="Tue, 21 Feb 2023 18:39:46 +0000"  >&lt;p&gt;Hey Greg, appreciate you reaching out on this one.&lt;/p&gt;

&lt;p&gt;GridFS does not currently support multidocument transactions. You can find more on this topic here: &lt;a href=&quot;https://www.mongodb.com/docs/manual/core/gridfs/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/docs/manual/core/gridfs/&lt;/a&gt;. I chatted with the team and currently, &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/transactions/transactions.rst#transactions-in-gridfs&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the GridFS spec&lt;/a&gt; may require some additional configuration parameters to support multidocument transactions.&lt;/p&gt;

&lt;p&gt;I&apos;ve opened a feature request to capture this work, and I&apos;ve linked it to this ticket as well. Please upvote that ticket and let me know if there are any specifics about your use case that you think might impact prioritization of that feature request.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2271033">JAVA-4890</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="586288">DRIVERS-559</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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|i1erlw:</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>