[JAVA-4887] GridFS doesn't support multi-document transactions Created: 16/Feb/23 Updated: 27/Oct/23 Resolved: 21/Feb/23 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Blocker - P1 |
| Reporter: | Greg Stewart | Assignee: | Ashni Mehta |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||||||
| Description |
SummaryThe MongoDb Java driver appears to not support multi-document transactions; ``` _ // _this.getFileObjectService() is my db service that uses a regular collection //Throws: Command failed with error 263 (OperationNotSupportedInTransaction): 'Cannot run 'listIndexes' in a multi-document transaction.' ``` As I am running CRUD operations on regular collections and Gridfs buckets, this error occurs. 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. Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).`4.8.2`, what is provided in current Quarkus versions How to ReproduceSee above; modifying data in a regular collection and then in a gridfs bucket.
_Determined this was a bug after seeing such posts as https://www.mongodb.com/community/forums/t/gridfs-does-not-support-multi-document-transactions/105984_ |
| Comments |
| Comment by Greg Stewart [ 21/Feb/23 ] |
|
Thanks Ashni! Much appreciated! |
| Comment by Ashni Mehta [ 21/Feb/23 ] |
|
Hey Greg, appreciate you reaching out on this one. GridFS does not currently support multidocument transactions. You can find more on this topic here: https://www.mongodb.com/docs/manual/core/gridfs/. I chatted with the team and currently, the GridFS spec may require some additional configuration parameters to support multidocument transactions. I've opened a feature request to capture this work, and I'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. |