-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Blocker - P1
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Summary
The MongoDb Java driver appears to not support multi-document transactions;
```
_ // _this.getFileObjectService() is my db service that uses a regular collection
_ _newId = this.getFileObjectService().add(clientSession, fileObject, interactingEntity);
__
GridFSUploadOptions ops = this.getUploadOps(metadata);
String filename = newId.toHexString() + "." + FilenameUtils.getExtension(metadata.getOrigName());
__
fileObject.setFileName(filename);
this.getFileObjectService().update(clientSession, fileObject);
__
//Throws: Command failed with error 263 (OperationNotSupportedInTransaction): 'Cannot run 'listIndexes' in a multi-document transaction.'
bucket.uploadFromStream(clientSession, filename, is, ops);
```
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 Reproduce
See 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_
- related to
-
JAVA-4890 Multidocument transaction support in GridFS
-
- Backlog
-
-
DRIVERS-559 GridFS with multi-document transaction support does not work
-
- Backlog
-