-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix LockRegLeaderIn for interrupted Thread.sleep (#2455)
* Fix LockRegLeaderIn for interrupted Thread.sleep https://build.spring.io/browse/INT-FATS5IC-517 If current thread is interrupted, the `Thread.sleep()` interrupts immediately. In the catch block of the main loop in the `LockRegistryLeaderInitiator` we have such a dangerous `sleep()` and don't restart election in this candidate any more * Move `Thread.sleep()` to else after checking the current thread for interrupted state * Remove `LongRunningIntegrationTest` rule from the `RedisLockRegistryLeaderInitiatorTests` since it now works much faster after proper `busy-wait` handling **Cherry-pick to master** * Ignore interruption on the sleep i catch and move on with loop
- Loading branch information
1 parent
0285a99
commit 7f898a5
Showing
2 changed files
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters