Commit 6fb8993
DefaultLockRepository: optimize time use in the acquire()
Related to: #10906
Currently, the `currentTime()` is used twice in the same query: for `currentTime` and `ttl` query params.
* Extract `currentTime` into local variable and use it for the `ttl` query param.
* Calculate `currentTime` for a second update query: the time might pass since the previous update query call
(cherry picked from commit adcfdfb)1 parent d91d473 commit 6fb8993
1 file changed
Lines changed: 7 additions & 3 deletions
File tree
- spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/lock
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
416 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
417 | 419 | | |
418 | 420 | | |
| 421 | + | |
419 | 422 | | |
| 423 | + | |
420 | 424 | | |
421 | | - | |
| 425 | + | |
422 | 426 | | |
423 | 427 | | |
424 | 428 | | |
| |||
0 commit comments