-
Notifications
You must be signed in to change notification settings - Fork 356
API for pessimistic locks (SELECT … FOR UPDATE
)
#1041
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
Labels
type: enhancement
A general enhancement
Comments
SELECT … FOR UPDATE
)
DiegoKrupitza
added a commit
to DiegoKrupitza/spring-data-jdbc
that referenced
this issue
Feb 4, 2022
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 HSQLDB `Select ... FOR UPDATE`. Related tickets spring-projects#1041
4 tasks
schauder
pushed a commit
that referenced
this issue
Feb 9, 2022
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 HSQLDB `Select ... FOR UPDATE`. See #1041 Original pull request #1158
schauder
added a commit
that referenced
this issue
Feb 9, 2022
Refactored the unit tests to include a negative case and to separate the different scenarios tested. Removed the default LockMode from the Lock annotation. I have the feeling that most users will assume an exclusive Lock when none is specified, but also don't want to request stronger locks than required. Original pull request #1158 See #1041
schauder
pushed a commit
that referenced
this issue
Feb 15, 2022
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 HSQLDB `Select ... FOR UPDATE`. See #1041 Original pull request #1158
schauder
added a commit
that referenced
this issue
Feb 15, 2022
Refactored the unit tests to include a negative case and to separate the different scenarios tested. Removed the default LockMode from the Lock annotation. I have the feeling that most users will assume an exclusive Lock when none is specified, but also don't want to request stronger locks than required. Original pull request #1158 See #1041
My current draft only considers derived queries so far, since this does not require tinkering around with the (native) custom query. |
DiegoKrupitza
added a commit
to DiegoKrupitza/spring-data-r2dbc
that referenced
this issue
Feb 15, 2022
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
4 tasks
schauder
added a commit
that referenced
this issue
Feb 22, 2022
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
schauder
added a commit
that referenced
this issue
Feb 22, 2022
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
schauder
pushed a commit
that referenced
this issue
Feb 22, 2022
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 #1041 See #643, Original pull request /pull/1158
schauder
added a commit
that referenced
this issue
Feb 22, 2022
See /issues/1041 Original pull request spring-projects/spring-data-r2dbc/pull/720
Closed by #910c340 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, there!
There is any plans to implement some locking api for spring r2dbc (may be with R2dbcEntityTemplate)
as it was in classic spring data jpa like this
And of course, would be glad to see any examples of workaround to implement pessimistic locking used current version of spring-data-r2dbc
The text was updated successfully, but these errors were encountered: