Skip to content

GridFS in transactions #3640

@miroslavvojtus

Description

@miroslavvojtus

Hi Spring masters,

we are trying to use MongoDB 4.0 transactions in our project.
Unfortunatelly there is no out of the box transaction support for GridFS (or am I wrong?)

We attempted to create custom transaction aware MongoDatabaseFactory which enabled transactions in constructed GridFSTemplate but it immediately fails due to listIndexes operation which is not possible to disable in default GridFsBucketImpl.

Stack trace starts with:

com.mongodb.MongoCommandException: Command failed with error 263 (OperationNotSupportedInTransaction): 'Cannot run 'listIndexes' in a multi-document transaction.'

Do you have some hints how to use transactions with current GridFS implementation? Do you plan to implement full fledged transaction support?

Many thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions