Open VictorCavichioli opened 4 weeks ago
I would recommend the following primary key PRIMARY KEY ( ecchronos_id, datacenter_name, node_id )
node_status should not be in there, or else you would have to delete and re insert the record when the status changes. node_id should be used rather rather than node_endpoint as this will not change when the echronos is restarted by k8s.
Hi @paulchandler , thank you for your comment, the design for that table would be now this:
CREATE TABLE ecchronos.nodes_sync
(
ecchronos_id TEXT,
datacenter_name TEXT,
node_id UUID,
node_endpoint TEXT,
node_status TEXT,
last_connection TIMESTAMP,
next_connection TIMESTAMP,
PRIMARY KEY
(
ecchronos_id,
datacenter_name,
node_id
)
) WITH CLUSTERING ORDER BY(
datacenter_name DESC,
node_id DESC
);
Story Description: To keep ecchronos instances on sync is proposed to create a sync table, this table is not fully designed yet and might change on the future, but for the initial PoC is proposed to follow the below CQL definition:
Is proposed to create a new package called sync in the core module with the designed class, at the beginning the insertStatement function is mandatory.
Acceptance Criteria:
Definition of Done:
Code designed as described and approved by the maintainers
Notes:
Use EccRepairHistory as an inspiration.
Related to #652