Fix compilation when DBENGINE is disabled (#21323)
Stelios Fragkakis committed
Nov 21, 2025 at 07:41 UTC
49f117b1265929275770f151d233929670fa2233
1 file changed
+7
src/web/api/queries/weights.c
+7
@@ -2226,6 +2226,12 @@ static ssize_t weights_do_context_callback(void *data, RRDCONTEXT_ACQUIRED *rca,
2226
static ssize_t query_scope_foreach_host_parallel(SIMPLE_PATTERN *scope_hosts_sp, SIMPLE_PATTERN *hosts_sp,
2227
struct query_weights_data *qwd)
2228
{
2229
+#ifndef ENABLE_DBENGINE
2230
+ return query_scope_foreach_host(scope_hosts_sp, hosts_sp,
2231
+ weights_do_node_callback, qwd,
2232
+ &qwd->versions, NULL);
2233
+
2234
+#else
2235
size_t host_count = dictionary_entries(rrdhost_root_index);
2236
qwd->hosts_array = mallocz(sizeof(RRDHOST *) * host_count);
2237
qwd->hosts_array_capacity = host_count;
@@ -2305,6 +2311,7 @@ static ssize_t query_scope_foreach_host_parallel(SIMPLE_PATTERN *scope_hosts_sp,
2311
freez(qwd->hosts_array);
2312
2313
return total_added;
2314
+#endif
2315
}
2316
2317
static ssize_t weights_do_node_callback(void *data, RRDHOST *host, bool queryable) {