GoogleCloudPlatform / GoogleCloudPlatform/spring-cloud-gcp

Datastore: support for previous transaction id in transaction manager

Open
#4,262 1 comment 0 reactions 0 assignees View on GitHub
priority: p2 type: enhancement
Dominant language
Java
Stars
551
Forks
349
Avg merge
1d 13h
Merged PRs (30d)
14

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.