From 8a0b6e88605d59a9e4edd98863948043a008e9c1 Mon Sep 17 00:00:00 2001 From: jimi Date: Wed, 27 Oct 2021 13:26:18 +0800 Subject: [PATCH 1/2] Fix RedissonRemoteService If requestId returns null, the free worker counter per minute is -1, which quickly becomes 0, and the service cannot be called. Signed-off-by: jimichan --- redisson/src/main/java/org/redisson/RedissonRemoteService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/redisson/src/main/java/org/redisson/RedissonRemoteService.java b/redisson/src/main/java/org/redisson/RedissonRemoteService.java index 45dfd0bcb..30e46f8ae 100644 --- a/redisson/src/main/java/org/redisson/RedissonRemoteService.java +++ b/redisson/src/main/java/org/redisson/RedissonRemoteService.java @@ -294,6 +294,8 @@ public class RedissonRemoteService extends BaseRemoteService implements RRemoteS // poll method may return null value if (requestId == null) { + // Because the previous code is already -1, it must be +1 before returning, otherwise the counter will become 0 soon + entry.getCounter().incrementAndGet(); return; } From 497dcfeeef33e1296f202a82c5b344da1ec1671a Mon Sep 17 00:00:00 2001 From: jimi Date: Wed, 27 Oct 2021 14:08:22 +0800 Subject: [PATCH 2/2] Fix RedissonRemoteService If requestId returns null, the free worker counter per minute is -1, which quickly becomes 0, and the service cannot be called. Signed-off-by: jimichan --- redisson/src/main/java/org/redisson/RedissonRemoteService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redisson/src/main/java/org/redisson/RedissonRemoteService.java b/redisson/src/main/java/org/redisson/RedissonRemoteService.java index 30e46f8ae..1d06fac69 100644 --- a/redisson/src/main/java/org/redisson/RedissonRemoteService.java +++ b/redisson/src/main/java/org/redisson/RedissonRemoteService.java @@ -295,7 +295,7 @@ public class RedissonRemoteService extends BaseRemoteService implements RRemoteS // poll method may return null value if (requestId == null) { // Because the previous code is already -1, it must be +1 before returning, otherwise the counter will become 0 soon - entry.getCounter().incrementAndGet(); + resubscribe(remoteInterface, requestQueue, executor, bean); return; }