Skip to content

Commit 379bbed

Browse files
authored
Fix: return of CLUSTER REPLICAS is Array reply (#2990)
not Bulk reply as it as has been stated in the [Redis doc](https://redis.io/commands/cluster-replicas/)
1 parent 76764b9 commit 379bbed

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/main/java/redis/clients/jedis/Jedis.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -8581,13 +8581,6 @@ public String clusterNodes() {
85818581
return connection.getBulkReply();
85828582
}
85838583

8584-
@Override
8585-
public String clusterReplicas(final String nodeId) {
8586-
checkIsInMultiOrPipeline();
8587-
connection.sendCommand(CLUSTER, ClusterKeyword.REPLICAS.name(), nodeId);
8588-
return connection.getBulkReply();
8589-
}
8590-
85918584
@Override
85928585
public String clusterMeet(final String ip, final int port) {
85938586
checkIsInMultiOrPipeline();
@@ -8743,6 +8736,13 @@ public List<String> clusterSlaves(final String nodeId) {
87438736
return connection.getMultiBulkReply();
87448737
}
87458738

8739+
@Override
8740+
public List<String> clusterReplicas(final String nodeId) {
8741+
checkIsInMultiOrPipeline();
8742+
connection.sendCommand(CLUSTER, ClusterKeyword.REPLICAS.name(), nodeId);
8743+
return connection.getMultiBulkReply();
8744+
}
8745+
87468746
@Override
87478747
public String clusterFailover() {
87488748
checkIsInMultiOrPipeline();

src/main/java/redis/clients/jedis/commands/ClusterCommands.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ public interface ClusterCommands {
1616

1717
String clusterNodes();
1818

19-
String clusterReplicas(String nodeId);
20-
2119
String clusterMeet(String ip, int port);
2220

2321
String clusterAddSlots(int... slots);
@@ -75,6 +73,8 @@ public interface ClusterCommands {
7573
@Deprecated
7674
List<String> clusterSlaves(String nodeId);
7775

76+
List<String> clusterReplicas(String nodeId);
77+
7878
String clusterFailover();
7979

8080
String clusterFailover(ClusterFailoverOption failoverOption);

0 commit comments

Comments
 (0)