Skip to content

Commit

Permalink
Fix: return of CLUSTER REPLICAS is Array reply (#2990)
Browse files Browse the repository at this point in the history
not Bulk reply as it as has been stated in the [Redis doc](https://redis.io/commands/cluster-replicas/)
  • Loading branch information
sazzad16 authored Apr 29, 2022
1 parent 76764b9 commit 379bbed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/main/java/redis/clients/jedis/Jedis.java
Original file line number Diff line number Diff line change
Expand Up @@ -8581,13 +8581,6 @@ public String clusterNodes() {
return connection.getBulkReply();
}

@Override
public String clusterReplicas(final String nodeId) {
checkIsInMultiOrPipeline();
connection.sendCommand(CLUSTER, ClusterKeyword.REPLICAS.name(), nodeId);
return connection.getBulkReply();
}

@Override
public String clusterMeet(final String ip, final int port) {
checkIsInMultiOrPipeline();
Expand Down Expand Up @@ -8743,6 +8736,13 @@ public List<String> clusterSlaves(final String nodeId) {
return connection.getMultiBulkReply();
}

@Override
public List<String> clusterReplicas(final String nodeId) {
checkIsInMultiOrPipeline();
connection.sendCommand(CLUSTER, ClusterKeyword.REPLICAS.name(), nodeId);
return connection.getMultiBulkReply();
}

@Override
public String clusterFailover() {
checkIsInMultiOrPipeline();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ public interface ClusterCommands {

String clusterNodes();

String clusterReplicas(String nodeId);

String clusterMeet(String ip, int port);

String clusterAddSlots(int... slots);
Expand Down Expand Up @@ -75,6 +73,8 @@ public interface ClusterCommands {
@Deprecated
List<String> clusterSlaves(String nodeId);

List<String> clusterReplicas(String nodeId);

String clusterFailover();

String clusterFailover(ClusterFailoverOption failoverOption);
Expand Down

0 comments on commit 379bbed

Please sign in to comment.