From 53a13ab8e110923d097968353a6bc1e22399480f Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Mon, 28 Nov 2022 12:22:38 +0200 Subject: replication fixes No 7 (#14053) * move global statistics workers to a separate thread; query statistics per query source; query statistics for ML, exporters, backfilling; reset replication point in time every 10 seconds, instead of every 1; fix compilation warnings; optimize the replication queries code; prevent long tail of replication requests (big sleeps); provide query statistics about replication ; optimize replication sender when most senders are full; optimize replication_request_get_first_available(); reset replication completion calculation; * remove workers utilization from global statistics thread --- exporting/process_data.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'exporting') diff --git a/exporting/process_data.c b/exporting/process_data.c index 53b028f800..fbcda0d9b7 100644 --- a/exporting/process_data.c +++ b/exporting/process_data.c @@ -122,11 +122,13 @@ NETDATA_DOUBLE exporting_calculate_value_from_stored_data( *last_timestamp = before; + size_t points_read = 0; size_t counter = 0; NETDATA_DOUBLE sum = 0; for (rd->tiers[0]->query_ops->init(rd->tiers[0]->db_metric_handle, &handle, after, before); !rd->tiers[0]->query_ops->is_finished(&handle);) { STORAGE_POINT sp = rd->tiers[0]->query_ops->next_metric(&handle); + points_read++; if (unlikely(storage_point_is_empty(sp))) { // not collected @@ -137,6 +139,7 @@ NETDATA_DOUBLE exporting_calculate_value_from_stored_data( counter += sp.count; } rd->tiers[0]->query_ops->finalize(&handle); + global_statistics_exporters_query_completed(points_read); if (unlikely(!counter)) { debug( -- cgit v1.2.3