summaryrefslogtreecommitdiffstats
path: root/database/sqlite/sqlite_aclk_chart.h
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2021-11-03 19:18:35 +0200
committerGitHub <noreply@github.com>2021-11-03 19:18:35 +0200
commite9efad18e8c53ac4cb777d553efe4b22cc874b7b (patch)
tree3a41e20ebfbadcea5c3cba73eef98b502d072d60 /database/sqlite/sqlite_aclk_chart.h
parent339c5c436d50ca37c0abe2dbac68cb891fe6bab1 (diff)
Improve the ACLK sync process for the new cloud architecture (#11744)
* Move retention code to the charts * Log information about node registration and updates * Prevent deadlock if aclk_database_enq_cmd locks for a node * Improve message (indicate that it comes from alerts). This will be improved in a followup PR * Disable parts that can't be used if the new cloud env is not available * Set dimension FLAG if message has been queued * Queue messages using the correct protocol enabled * Cleanup unused functions Rename functions that queue charts and dimensions Improve the generic chart payload add function Add a counter for pending charts/dimension payloads to avoid polling the db Delay the retention update message until we are done with the updates Fix full resync command to handle sequence_id = 0 correctly Disable functions not needed when the new cloud env functionality is not compiled * Add chart_payload count and retry count Output information or error message if we fail to queue chart/dimension PUSH commands Only try to queue commands if we have chart_payload_count>0 Remove the event loop shutdown opcode handle * Improve detection of shutdown (check netdata_exit) * Adjusting info messages
Diffstat (limited to 'database/sqlite/sqlite_aclk_chart.h')
-rw-r--r--database/sqlite/sqlite_aclk_chart.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/database/sqlite/sqlite_aclk_chart.h b/database/sqlite/sqlite_aclk_chart.h
index aa5ab842c1..dfdaae4265 100644
--- a/database/sqlite/sqlite_aclk_chart.h
+++ b/database/sqlite/sqlite_aclk_chart.h
@@ -16,25 +16,21 @@ extern sqlite3 *db_meta;
#define RRDSET_MINIMUM_LIVE_COUNT 3
#endif
-//void aclk_status_chart_event(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
-extern int sql_queue_chart_to_aclk(RRDSET *st);
-extern int sql_queue_dimension_to_aclk(RRDDIM *rd);
+extern int queue_chart_to_aclk(RRDSET *st);
+extern int queue_dimension_to_aclk(RRDDIM *rd);
extern void sql_create_aclk_table(RRDHOST *host, uuid_t *host_uuid, uuid_t *node_id);
extern void sql_queue_alarm_to_aclk(RRDHOST *host, ALARM_ENTRY *ae);
int aclk_add_chart_event(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
int aclk_add_dimension_event(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
-int aclk_add_offline_dimension_event(struct aclk_database_worker_config *wc, char *node_id, char *chart_name, uuid_t *dim_uuid, char *rd_id, char *rd_name, time_t first_entry_t, time_t last_entry_t);
int aclk_send_chart_config(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
void aclk_ack_chart_sequence_id(char *node_id, uint64_t last_sequence_id);
void aclk_get_chart_config(char **hash_id_list);
void aclk_send_chart_event(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
-void aclk_reset_chart_event(char *node_id, uint64_t last_sequence_id);
void aclk_start_streaming(char *node_id, uint64_t seq_id, time_t created_at, uint64_t batch_id);
void sql_chart_deduplicate(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
-void sql_check_dimension_state(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
void sql_check_rotation_state(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
-void sql_get_last_chart_sequence(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
+void sql_get_last_chart_sequence(struct aclk_database_worker_config *wc);
void aclk_receive_chart_reset(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
void aclk_receive_chart_ack(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
-void sql_update_metric_statistics(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd);
+uint32_t sql_get_pending_count(struct aclk_database_worker_config *wc);
#endif //NETDATA_SQLITE_ACLK_CHART_H