summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2023-04-27 09:55:07 +0300
committerGitHub <noreply@github.com>2023-04-27 09:55:07 +0300
commit8f137fc154874e4f53d4600ac59dbd540d4872de (patch)
tree69cb0d47f06375f41f4c0e8d90122f54cf0d1248
parent3d8a4d82f4be2dea475006028b1e6d74a56e3688 (diff)
interrupt callback on api/v1/data (#14978)
* interrupt callback on api/v1/data * smaller tier_grouping member size
-rw-r--r--database/contexts/internal.h2
-rw-r--r--database/rrd.h4
-rw-r--r--web/api/web_api_v1.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/database/contexts/internal.h b/database/contexts/internal.h
index 610552838e..9917d58e4b 100644
--- a/database/contexts/internal.h
+++ b/database/contexts/internal.h
@@ -218,7 +218,7 @@ typedef struct rrdinstance {
STRING *title;
STRING *units;
STRING *family;
- uint32_t priority;
+ uint32_t priority:24;
RRDSET_TYPE chart_type;
RRD_FLAGS flags; // flags related to this instance
diff --git a/database/rrd.h b/database/rrd.h
index 7c604bf106..0f67a3b770 100644
--- a/database/rrd.h
+++ b/database/rrd.h
@@ -319,7 +319,7 @@ typedef struct storage_collect_handle {
struct rrddim_tier {
STORAGE_POINT virtual_point;
STORAGE_ENGINE_BACKEND backend;
- size_t tier_grouping;
+ uint32_t tier_grouping;
time_t next_point_end_time_s;
STORAGE_METRIC_HANDLE *db_metric_handle; // the metric handle inside the database
STORAGE_COLLECT_HANDLE *db_collection_handle; // the data collection handle
@@ -1135,7 +1135,7 @@ struct rrdhost {
RRD_MEMORY_MODE mode; // the db mode for this tier
STORAGE_ENGINE *eng; // the storage engine API for this tier
STORAGE_INSTANCE *instance; // the db instance for this tier
- size_t tier_grouping; // tier 0 iterations aggregated on this tier
+ uint32_t tier_grouping; // tier 0 iterations aggregated on this tier
} db[RRD_STORAGE_TIERS];
struct rrdhost_system_info *system_info; // information collected from the host environment
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c
index 3e4100aa8c..6e23549d4a 100644
--- a/web/api/web_api_v1.c
+++ b/web/api/web_api_v1.c
@@ -713,6 +713,8 @@ static inline int web_client_api_request_v1_data(RRDHOST *host, struct web_clien
.labels = chart_labels_filter,
.query_source = QUERY_SOURCE_API_DATA,
.priority = STORAGE_PRIORITY_NORMAL,
+ .interrupt_callback = web_client_interrupt_callback,
+ .interrupt_callback_data = w,
};
qt = query_target_create(&qtr);