-
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.
GH-8699: Atomic Redis script for
unlock()
Expected Behavior Using a single Lua script to verify ownership of the lock and remove it. Current Behavior `unlock()` method of `RedisLock` uses two separate Redis operations: * `isAcquiredInThisProcess()`` method executes a `GET` operation to verify if the lock is owned by the process. * `removeLockKey()`` method executes `UNLINK/DEL` operation to remove the lock. * The `removeLockKeyInnerUnlink()`, and `removeLockKeyInnerDelete()` methods will execute a script both verify ownership of the lock and remove it. **Cherry-pick to `6.1.x` & `6.0.x`** # Conflicts: # spring-integration-redis/src/main/java/org/springframework/integration/redis/util/RedisLockRegistry.java
- Loading branch information
1 parent
b81ab75
commit 2e62707
Showing
1 changed file
with
73 additions
and
35 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