in iep-spring-leader-redis-cluster/src/main/java/com/netflix/iep/leader/redis/RedisClusterLeaderClient.java [75:91]
Jedis leaderForSlot(int slot) {
Jedis client = getLeaderForSlot(slot);
if (client == null) {
// force renewal and then try one more time.
if (jedis.getCommandExecutor() instanceof ClusterCommandExecutor) {
((ClusterCommandExecutor) jedis.getCommandExecutor()).provider.renewSlotCache();
}
client = getLeaderForSlot(slot);
}
if (client != null) {
return client;
}
throw new JedisException("Unable to find leader for slot " + slot
+ " after two attempts.");
}