interrupt callback on api/v1/data (#14978)
* interrupt callback on api/v1/data * smaller tier_grouping member size
Costa Tsaousis committed
Apr 27, 2023 at 09:55 UTC
8f137fc154874e4f53d4600ac59dbd540d4872de
3 files changed
+5
-3
database/contexts/internal.h
+1
-1
@@ -218,7 +218,7 @@ typedef struct rrdinstance {
218
STRING *title;
219
STRING *units;
220
STRING *family;
221
- uint32_t priority;
221
+ uint32_t priority:24;
222
RRDSET_TYPE chart_type;
223
224
RRD_FLAGS flags; // flags related to this instance
database/rrd.h
+2
-2
@@ -319,7 +319,7 @@ typedef struct storage_collect_handle {
319
struct rrddim_tier {
320
STORAGE_POINT virtual_point;
321
STORAGE_ENGINE_BACKEND backend;
322
- size_t tier_grouping;
322
+ uint32_t tier_grouping;
323
time_t next_point_end_time_s;
324
STORAGE_METRIC_HANDLE *db_metric_handle; // the metric handle inside the database
325
STORAGE_COLLECT_HANDLE *db_collection_handle; // the data collection handle
@@ -1135,7 +1135,7 @@ struct rrdhost {
1135
RRD_MEMORY_MODE mode; // the db mode for this tier
1136
STORAGE_ENGINE *eng; // the storage engine API for this tier
1137
STORAGE_INSTANCE *instance; // the db instance for this tier
1138
- size_t tier_grouping; // tier 0 iterations aggregated on this tier
1138
+ uint32_t tier_grouping; // tier 0 iterations aggregated on this tier
1139
} db[RRD_STORAGE_TIERS];
1140
1141
struct rrdhost_system_info *system_info; // information collected from the host environment
web/api/web_api_v1.c
+2
@@ -713,6 +713,8 @@ static inline int web_client_api_request_v1_data(RRDHOST *host, struct web_clien
713
.labels = chart_labels_filter,
714
.query_source = QUERY_SOURCE_API_DATA,
715
.priority = STORAGE_PRIORITY_NORMAL,
716
+ .interrupt_callback = web_client_interrupt_callback,
717
+ .interrupt_callback_data = w,
718
};
719
qt = query_target_create(&qtr);
720