diff --git a/src/main/java/org/redisson/RedissonListMultimapCache.java b/src/main/java/org/redisson/RedissonListMultimapCache.java index 2ba95e527..828ff6e14 100644 --- a/src/main/java/org/redisson/RedissonListMultimapCache.java +++ b/src/main/java/org/redisson/RedissonListMultimapCache.java @@ -131,7 +131,7 @@ public class RedissonListMultimapCache extends RedissonListMultimap + "end; " + "if expireDate > tonumber(ARGV[1]) then " + "local items = redis.call('lrange', KEYS[1], 0, -1); " + - "for i=0, #items do " + + "for i = 1, #items do " + "if items[i] == ARGV[3] then " + "return 1; " + "end; " + diff --git a/src/main/java/org/redisson/RedissonSubList.java b/src/main/java/org/redisson/RedissonSubList.java index 759200eef..4e474bb7d 100644 --- a/src/main/java/org/redisson/RedissonSubList.java +++ b/src/main/java/org/redisson/RedissonSubList.java @@ -179,7 +179,7 @@ public class RedissonSubList extends RedissonList implements RList { "local items = redis.call('lrange', KEYS[1], fromIndex, toIndex); " + "for i=1, #items do " + - "for j = 0, #ARGV, 1 do " + + "for j = 1, #ARGV, 1 do " + "if items[i] == ARGV[j] then " + "redis.call('lrem', KEYS[1], count, ARGV[i]); " + "v = 1; " + diff --git a/src/main/java/org/redisson/reactive/RedissonScoredSortedSetReactive.java b/src/main/java/org/redisson/reactive/RedissonScoredSortedSetReactive.java index b600ab844..f72152841 100644 --- a/src/main/java/org/redisson/reactive/RedissonScoredSortedSetReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonScoredSortedSetReactive.java @@ -140,8 +140,8 @@ public class RedissonScoredSortedSetReactive extends RedissonExpirableReactiv public Publisher containsAll(Collection c) { return commandExecutor.evalReadReactive(getName(), codec, new RedisCommand("EVAL", new BooleanReplayConvertor(), 4, ValueType.OBJECTS), "local s = redis.call('zrange', KEYS[1], 0, -1);" + - "for i = 0, table.getn(s), 1 do " + - "for j = 0, table.getn(ARGV), 1 do " + "for i = 1, table.getn(s), 1 do " + + "for j = 1, table.getn(ARGV), 1 do " + "if ARGV[j] == s[i] " + "then table.remove(ARGV, j) end " + "end; " @@ -171,7 +171,7 @@ public class RedissonScoredSortedSetReactive extends RedissonExpirableReactiv + "while i <= table.getn(s) do " + "local element = s[i] " + "local isInAgrs = false " - + "for j = 0, table.getn(ARGV), 1 do " + + "for j = 1, table.getn(ARGV), 1 do " + "if ARGV[j] == element then " + "isInAgrs = true " + "break " diff --git a/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java b/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java index bce238a28..dc768e88a 100644 --- a/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java @@ -224,8 +224,8 @@ public class RedissonSetCacheReactive extends RedissonExpirableReactive imple public Publisher containsAll(Collection c) { return commandExecutor.evalReadReactive(getName(), codec, RedisCommands.EVAL_BOOLEAN_WITH_VALUES, "local s = redis.call('hvals', KEYS[1]);" + - "for i = 0, table.getn(s), 1 do " + - "for j = 0, table.getn(ARGV), 1 do " + "for i = 1, table.getn(s), 1 do " + + "for j = 1, table.getn(ARGV), 1 do " + "if ARGV[j] == s[i] then " + "table.remove(ARGV, j) " + "end "