@cryptotaxi247 / netdata-1 / commits / fe386aad5

Fix race on query thread startup (#14164)

fixes race on startup of query threads

Timotej S committed Dec 21, 2022 at 16:55 UTC fe386aad57f24574783f4c68bab433a5cdfe6f64
1 file changed +1 -2
aclk/aclk_query.c
+1 -2
@@ -359,14 +359,13 @@ void aclk_query_threads_start(struct aclk_query_threads *query_threads, mqtt_wss
359 query_threads->thread_list = callocz(query_threads->count, sizeof(struct aclk_query_thread));
360 for (int i = 0; i < query_threads->count; i++) {
361 query_threads->thread_list[i].idx = i; //thread needs to know its index for statistics
362 + query_threads->thread_list[i].client = client;
363
364 if(unlikely(snprintfz(thread_name, TASK_LEN_MAX, "%s_%d", ACLK_QUERY_THREAD_NAME, i) < 0))
365 error("snprintf encoding error");
366 netdata_thread_create(
367 &query_threads->thread_list[i].thread, thread_name, NETDATA_THREAD_OPTION_JOINABLE, aclk_query_main_thread,
368 &query_threads->thread_list[i]);
368 -
369 - query_threads->thread_list[i].client = client;
369 }
370 }
371