fix: semaphore pub when permits not updated

Signed-off-by: wuziming <wuziming@sensetime.com>
pull/4979/head
吴梓铭 2 years ago committed by wuziming
parent 214fad881a
commit 643d63b139

@ -714,7 +714,7 @@ public class RedissonPermitExpirableSemaphore extends RedissonExpirable implemen
"end;" +
"local acquired = redis.call('zcount', KEYS[3], 0, '+inf'); " +
"local maximum = (acquired == false and 0 or acquired) + tonumber(available); " +
"if (maximum == ARGV[1]) then " +
"if (maximum == tonumber(ARGV[1])) then " +
"return;" +
"end;" +
"redis.call('incrby', KEYS[1], tonumber(ARGV[1]) - maximum); " +

Loading…
Cancel
Save