jedis icon indicating copy to clipboard operation
jedis copied to clipboard

Introduce a way to easily check cluster status

Open sazzad16 opened this issue 3 years ago • 2 comments

Expected behavior

There should be a easy to check if the cluster is initialized properly. I.e. if there is a pool initialized for each hash slot.

For example, if we add a isInitialized(), users would at least be able to do

JedisCluster cluster = new JedisCluster(...);
if (!cluster.isInitialized()) {
  ...
}

Actual behavior

Currently it can be done by getClusterNodes(), may be combining with a command, like PING. But we should introduce a easier way.

sazzad16 avatar Apr 07 '21 06:04 sazzad16

Ref #2275: I don't completely support throwing exception because we don't do that even from Jedis class. Throwing exception from JedisCluster constructor seems contradictory to me.

sazzad16 avatar Apr 07 '21 06:04 sazzad16

This issue is marked stale. It will be closed in 30 days if it is not updated.

github-actions[bot] avatar Jan 03 '24 00:01 github-actions[bot]