Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the new extensible transaction definition in R2DBC SPI #238

Closed
elefeint opened this issue May 8, 2020 · 0 comments · Fixed by #738
Closed

Implement the new extensible transaction definition in R2DBC SPI #238

elefeint opened this issue May 8, 2020 · 0 comments · Fixed by #738
Labels
enhancement New feature or request P2

Comments

@elefeint
Copy link
Contributor

elefeint commented May 8, 2020

Extend TransactionDefinition to support read-only, read-write, stale-read (and partitioned DML?) transactions with the extensible transaction definition in r2dbc/r2dbc-spi#159.

The transaction definition should map its own values to valid calls to already-implemented DatabaseClientTransactionManager.beginReadonlyTransaction(TimestampBound timestampBound)

@ttomsu ttomsu added the enhancement New feature or request label Oct 7, 2020
@elefeint elefeint assigned elefeint and unassigned dzou Oct 15, 2020
@elefeint elefeint added P2 and removed exploratory labels Aug 12, 2022
@elefeint elefeint changed the title Test out the new extensible transaction definition in R2DBC SPI Implement the new extensible transaction definition in R2DBC SPI Dec 2, 2022
@elefeint elefeint added this to the Support R2DBC SPI 1.0 milestone Dec 2, 2022
@elefeint elefeint removed their assignment Dec 2, 2022
meltsufin pushed a commit that referenced this issue Oct 30, 2023
… to support @transactional annotation (#738)

Implemented the following classes and methods to conform to R2DBC SPI which enables supporting `@Transactional` annotation in [Spring Data Dialect](https://github.com/GoogleCloudPlatform/spring-cloud-gcp/tree/main/spring-cloud-spanner-spring-data-r2dbc).

- `Connection#beginTransaction(TransactionDefinition)` method so that it can be used by a `TransactionManager` when `@Transactional` annotation is used. ✅
- `Connection#getTransactionIsolationLevel` returns SERIALIZABLE as it is the closest level to EXTERNAL_CONSISTENCY which spanner supports. ✅
- `Connection#setTransactionIsolationLevel(IsolationLevel)` accepts only `IsolationLevel.SERIALIZABLE` and throw `UnsupportedOperationException` otherwise. ✅
- Introduced `SpannerTransactionDefinition`, an implementation of `TransactionDefinition`(R2DBC spi) to configure the transaction attributes which will be used by `Connection#beginTransaction(TransactionDefinition)` method. ✅

Fixes: #238.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2
Projects
None yet
3 participants