Commit adcfdfb
committed
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
**Auto-cherry-pick to `7.0.x`**1 parent 445fbcb commit adcfdfb
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 | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
393 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
394 | 396 | | |
395 | 397 | | |
| 398 | + | |
396 | 399 | | |
| 400 | + | |
397 | 401 | | |
398 | | - | |
| 402 | + | |
399 | 403 | | |
400 | 404 | | |
401 | 405 | | |
| |||
0 commit comments