提交 14e475d8 编写于 作者: N Nikita Koksharov

Fixed - eval command executed on Redis cluster doesn't use key for master/slave selection. #3370

上级 e70c91b7
...@@ -82,12 +82,20 @@ public class RedissonScript implements RScript { ...@@ -82,12 +82,20 @@ public class RedissonScript implements RScript {
@Override @Override
public <R> R eval(Mode mode, String luaScript, ReturnType returnType, List<Object> keys, Object... values) { public <R> R eval(Mode mode, String luaScript, ReturnType returnType, List<Object> keys, Object... values) {
return eval(null, mode, luaScript, returnType, keys, values); String key = null;
if (!keys.isEmpty()) {
key = (String) keys.get(0);
}
return eval(key, mode, luaScript, returnType, keys, values);
} }
@Override @Override
public <R> RFuture<R> evalAsync(Mode mode, String luaScript, ReturnType returnType, List<Object> keys, Object... values) { public <R> RFuture<R> evalAsync(Mode mode, String luaScript, ReturnType returnType, List<Object> keys, Object... values) {
return evalAsync(null, mode, luaScript, returnType, keys, values); String key = null;
if (!keys.isEmpty()) {
key = (String) keys.get(0);
}
return evalAsync(key, mode, luaScript, returnType, keys, values);
} }
@Override @Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册