Skip to content

Datastore: support for previous transaction id in transaction manager #4262

@pcostell

Description

@pcostell

Is your feature request related to a problem? Please describe.
When performing transactions in Firestore in Datastore Mode, occasionally the commit will fail. The base client library retry runners will retry that transaction with the previous transaction id, which makes following commits more likely to succeed, however that support does not exist in Spring.

Describe the solution you'd like
DatastoreTransactionManager automatically handles setting the previous transaction id when run with EnableRetry.

Describe alternatives you've considered
Workarounds currently include using DatastoreTemplate.performTransaction, which leverages a retry runner which properly sets previous transaction id. This workaround however does not allow usage of the Transactional annotation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions