Reputation: 1071
Is there a possibility to use read-only transactions with Spring Data R2DBC and especially with Google Spanner DB Backend? RO-transactions are supported in the Spanner R2DBC driver and offer much scalability advantage (no locking!). However, it is not R2DBC standard and I haven't found any support for this in the Spring Data R2DBC documentation.
Upvotes: 0
Views: 578
Reputation: 1414
Based on my research it looks like this is not possible yet.
I filed a feature request asking to support extended features in Spring Data R2DBC here: https://github.com/GoogleCloudPlatform/cloud-spanner-r2dbc/issues/314
The goal will be to allow you to make read only transactions using the Transaction annotation, like:
@Transactional(readonly = true)
public void readAndSaveRecords(..) {
}
Upvotes: 2