-
Notifications
You must be signed in to change notification settings - Fork 131
Introduced pessimistic locks for derived queries. #720
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
Introduced pessimistic locks for derived queries. #720
Conversation
Methods which use the derive query functionality now can be annotated with `@Lock` to used a given `LockMode`. Right now there are two different modes `PESSIMISTIC_READ` and `PESSIMISTIC_WRITE`. Based on the dialect the right select is generated. For example for H2 `Select ... FOR UPDATE`. Closes spring-projects/spring-data-relational#1041 Related tickets spring-projects#643
Thanks a lot. It makes sense to have this, but we're in the process of moving Spring Data R2DBC into Spring Data Relational (side by side with JDBC) and we need to apply some refactoring in JDBC first before we can merge this one.
Thanks a lot. It makes sense to have this, but we're in the process of moving Spring Data R2DBC into Spring Data Relational (side by side with JDBC) and we need to apply some refactoring in JDBC first before we can merge this one.
No worries! In case you have questions about the locking implementation, I am glad to help, since I also implemented the same for spring-data-JDBC.
This allows both Spring Data R2DBC and Spring Data JDBC to use the same annotation. See /issues/1041, spring-projects/spring-data-r2dbc/pull/720, /pull/1158
This allows both Spring Data R2DBC and Spring Data JDBC to use the same annotation. See /issues/1041, spring-projects/spring-data-r2dbc/pull/720, /pull/1158
See /issues/1041 Original pull request spring-projects/spring-data-r2dbc/pull/720
Thanks, that's merged polished and merged into 3.0.x
Methods which use the derive query functionality now can be annotated with
@Lock
to used a givenLockMode
. Right now there are two different modesPESSIMISTIC_READ
andPESSIMISTIC_WRITE
. Based on the dialect the right select is generated. For example for H2Select ... FOR UPDATE
.Closes spring-projects/spring-data-relational#1041
Related tickets #643