Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Invalid
-
0.1.0
-
None
Description
Previously Cluster.getClusterState() was returning the reference to ClusterState object and changing any elements of this state object would change the cluster state. Now as we have to persist the state, we have to explicitly make a call to Cluster.updateCluterState() when cluster state changes...
Following scenario will NOT update cluster state
Cluster cls = getClusterByName(clusterName);
cls.getClusterState().setState("ATTIC");
Instead,
Cluster cls = getClusterByName(clusterName);
ClusterState cs = cls.getClusterState();
cs.setState("ATTIC");
cls.updateClusterState(cs);