ecchronos
ecchronos copied to clipboard
Hot Reload of Nodes List
Story Description: Occasionally, it is necessary to perform bootstrapping, remove nodes, and decommission in Cassandra clusters. Therefore, it is required to periodically reload the list of nodes, refresh the JMX connections with these nodes, and reconcile the nodes_sync table to ensure it aligns with the latest information.
I think that the process for it might be:
- Create a new nodes list based on the agent type (As the provider does);
- If the length is equal, compare the node_id, if all is equal, so we don't need to reconcile anything, else, prepare for reconcile;
- If the length is not equal, so you need to compare the difference and then modifying the nodes_sync table, including and/or deleting the nodes;
- Refresh the nodes list on DistributedNativeProvider with the current nodes list;
- Refresh the nodes list on the DistributedJmxProvider with the current nodes list;
- Refresh the Jmx connections, closing and/or opening connections with the respective new nodes list.
Also, an time interval for this hot reload must be available on ecc.yml, I'd say that we can check it by default using 1 day of interval or even more].
Acceptance Criteria:
NA
Definition of Done:
Hot reload feature working as described, code approved by maintainers, time interval specified in ecc.yml
Notes:
This would required an really complex integration test, please evaluate if it can be done in the same patch or in a different one.
Related to #652