The old method doesn't return the correct information if a Partition is closed.
Because in the underlying methods, even if the StoreSessionManager is not currently running (i.e. if it was closed), the StoreSessionManager.isHealthy() method will returns true.
e.g. when the clusters were deleted, the healthy state remains true{"server-health-check":{"healthy":true,"zookeeper":true,"partitions":{"0":false,"1":false,"2":false,"3":false,"4":false}}}
Testing
Steps to locally verify functionality of this PR:
Start a new cluster with multiple partitions (delete old waltz containers if needed):
export WALTZ_TEST_CLUSTER_NUM_PARTITIONS=5bin/test-cluster.sh start
Stop and start server node couple of times (to increase generation value) ./bin/zookeeper-cli.sh list -c config/local-docker/waltz-tools.yml (command to check the generation number)
Problem
The old method doesn't return the correct information if a Partition is closed. Because in the underlying methods, even if the StoreSessionManager is not currently running (i.e. if it was closed), the StoreSessionManager.isHealthy() method will returns true.
e.g. when the clusters were deleted, the
healthy
state remainstrue
{"server-health-check":{"healthy":true,"zookeeper":true,"partitions":{"0":false,"1":false,"2":false,"3":false,"4":false}}}
Testing
Steps to locally verify functionality of this PR:
export WALTZ_TEST_CLUSTER_NUM_PARTITIONS=5
bin/test-cluster.sh start
./bin/zookeeper-cli.sh list -c config/local-docker/waltz-tools.yml
(command to check the generation number)bin/zookeeper-cli.sh delete -n waltz_cluster --cli-config-path ./config/local-docker/waltz-tools.yml
bin/zookeeper-cli.sh create -p 5 -n waltz_cluster --cli-config-path ./config/local-docker/waltz-tools.yml
./bin/docker/waltz-storage.sh start waltz_cluster 55280