Open
Description
Pavel Khokhlov opened DATAREDIS-1010 and commented
Current implementation of method:
org.springframework.data.redis.connection.jedis.JedisClusterConnection#execute(java.lang.String, byte[]...)
public Object execute(String command, byte[]... args) {
Assert.notNull(command, "Command must not be null!");
Assert.notNull(args, "Args must not be null!");
return clusterCommandExecutor
.executeCommandOnArbitraryNode((JedisClusterCommandCallback<Object>) client -> JedisClientUtils.execute(command,
EMPTY_2D_BYTE_ARRAY, args, () -> client))
.getValue();
}
Do execution of command on executeCommandOnArbitraryNode
which is queerly because potentially in Сluster we could run command on each cluster node
For example: "FLUSHDB ASYNC"
In general we should have a choice in which way we should run a command otherwise current solution do not cover all cases.
I would replace current implementation with executeCommandOnAllNodes it would be more universal.
Open discussion:
https://github.com/spring-projects/spring-data-redis/pull/283/files#r294802916
Affects: 2.2 RC1 (Moore)
1 votes, 3 watchers