Script issue fixed in RScoredSortedSet.retainAll

pull/488/head
Nikita 9 years ago
parent 1d123af02b
commit 6f6f0ffde4

@ -353,7 +353,7 @@ public class RedissonScoredSortedSet<V> extends RedissonExpirable implements RSc
return commandExecutor.evalWriteAsync(getName(), codec, RedisCommands.EVAL_BOOLEAN,
"redis.call('zadd', KEYS[2], unpack(ARGV)); "
+ "local prevSize = redis.call('zcard', KEYS[1]); "
+ "local size = redis.call('zinterstore', KEYS[1], #ARGV/2, KEYS[1], KEYS[2], 'aggregate', 'sum');"
+ "local size = redis.call('zinterstore', KEYS[1], 2, KEYS[1], KEYS[2], 'aggregate', 'sum');"
+ "redis.call('del', KEYS[2]); "
+ "return size ~= prevSize and 1 or 0; ",
Arrays.<Object>asList(getName(), "redisson_temp__{" + getName() + "}"), params.toArray());

Loading…
Cancel
Save