From d8ae507ff368128857d7a557d69b2377ece9abe8 Mon Sep 17 00:00:00 2001 From: Nikita Koksharov Date: Tue, 14 Dec 2021 13:14:07 +0300 Subject: [PATCH] Fixed - RSet.distributedIterator() and RScoredSortedSet.distributedIterator() methods throw script error #4017 --- .../src/main/java/org/redisson/RedissonScoredSortedSet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redisson/src/main/java/org/redisson/RedissonScoredSortedSet.java b/redisson/src/main/java/org/redisson/RedissonScoredSortedSet.java index 8767fd766..18e238d62 100644 --- a/redisson/src/main/java/org/redisson/RedissonScoredSortedSet.java +++ b/redisson/src/main/java/org/redisson/RedissonScoredSortedSet.java @@ -573,13 +573,13 @@ public class RedissonScoredSortedSet extends RedissonExpirable implements RSc args.add(count); return commandExecutor.evalWriteAsync(getRawName(), codec, RedisCommands.EVAL_ZSCAN, - "local cursor = redis.call('get', KEYS[3]); " + "local cursor = redis.call('get', KEYS[2]); " + "if cursor ~= false then " + "cursor = tonumber(cursor); " + "else " + "cursor = 0;" + "end;" - + "if start_index == -1 then " + + "if cursor == -1 then " + "return {0, {}}; " + "end;" + "local result; "