spring-projects / spring-projects/spring-data-redis
JedisClusterConnection. Execute. executeCommandOnArbitraryNode. [DATAREDIS-1010]
@christophstrobl is already working on this.
Since Dec 30, 2020.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.