Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ private final class RedisPubSubLock extends RedisLock {
private static final String UNLINK_UNLOCK_SCRIPT = """
local lockClientId = redis.call('GET', KEYS[1])
if (lockClientId == ARGV[1] and redis.call('UNLINK', KEYS[1]) == 1) then
redis.call('PUBLISH', KEYS[2], KEYS[1])
redis.call('PUBLISH', ARGV[2], KEYS[1])
return true
end
return false
Expand All @@ -693,8 +693,8 @@ protected boolean tryRedisLockInner(long time, long expireAfter)
protected boolean removeLockKeyInnerUnlink() {
final String unLockChannelKey = RedisLockRegistry.this.unLockChannelKey + ":" + this.lockKey;
return Boolean.TRUE.equals(RedisLockRegistry.this.redisTemplate.execute(
UNLINK_UNLOCK_REDIS_SCRIPT, List.of(this.lockKey, unLockChannelKey),
RedisLockRegistry.this.clientId));
UNLINK_UNLOCK_REDIS_SCRIPT, List.of(this.lockKey),
RedisLockRegistry.this.clientId, unLockChannelKey));
}

private boolean subscribeLock(long time, long expireAfter) throws ExecutionException, InterruptedException {
Expand Down