From dddb1580adbba98dfe13ec253bcd9a7b026b8356 Mon Sep 17 00:00:00 2001 From: Nikita Koksharov Date: Sat, 21 Dec 2024 10:01:39 +0300 Subject: [PATCH] Fixed - RPriorityBlockingQueue.draintTo() method shouldn't resend command on response timeout --- .../main/java/org/redisson/RedissonPriorityBlockingQueue.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redisson/src/main/java/org/redisson/RedissonPriorityBlockingQueue.java b/redisson/src/main/java/org/redisson/RedissonPriorityBlockingQueue.java index efa2e8850..83915392d 100644 --- a/redisson/src/main/java/org/redisson/RedissonPriorityBlockingQueue.java +++ b/redisson/src/main/java/org/redisson/RedissonPriorityBlockingQueue.java @@ -217,7 +217,7 @@ public class RedissonPriorityBlockingQueue extends RedissonPriorityQueue i throw new NullPointerException(); } - return commandExecutor.evalWriteAsync(getRawName(), codec, new RedisCommand("EVAL", new ListDrainToDecoder(c)), + return commandExecutor.evalWriteNoRetryAsync(getRawName(), codec, new RedisCommand("EVAL", new ListDrainToDecoder(c)), "local vals = redis.call('lrange', KEYS[1], 0, -1); " + "redis.call('ltrim', KEYS[1], -1, 0); " + "return vals", Collections.singletonList(getRawName())); @@ -242,7 +242,7 @@ public class RedissonPriorityBlockingQueue extends RedissonPriorityQueue i if (c == null) { throw new NullPointerException(); } - return commandExecutor.evalWriteAsync(getRawName(), codec, new RedisCommand("EVAL", new ListDrainToDecoder(c)), + return commandExecutor.evalWriteNoRetryAsync(getRawName(), codec, new RedisCommand("EVAL", new ListDrainToDecoder(c)), "local elemNum = math.min(ARGV[1], redis.call('llen', KEYS[1])) - 1;" + "local vals = redis.call('lrange', KEYS[1], 0, elemNum); " + "redis.call('ltrim', KEYS[1], elemNum + 1, -1); " +