-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
status: ideal-for-contributionAn issue that a contributor can help us withAn issue that a contributor can help us withtype: bugA general bugA general bug
Milestone
Description
The JedisClusterHashCommands.hStrLen() method does not use the getCluster() method to allow the command to be executed correctly in Cluster mode:
@Nullable
@Override
public Long hStrLen(byte[] key, byte[] field) {
return Long.class.cast(connection.execute("HSTRLEN", key, Collections.singleton(field)));
}
For comparison, all other methods in the class use connection.getCluster() e.g.:
@Override
public Map<byte[], byte[]> hGetAll(byte[] key) {
Assert.notNull(key, "Key must not be null!");
try {
return connection.getCluster().hgetAll(key);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
This can lead to exceptions in the client if servers are shutdown during execution of the command, instead of retying on a different server as is expected.
This bug appears to have been introduced with this commit and is still present in the latest unreleased version.
Metadata
Metadata
Assignees
Labels
status: ideal-for-contributionAn issue that a contributor can help us withAn issue that a contributor can help us withtype: bugA general bugA general bug