@cryptotaxi247 / netdata-1 / commits / 5b20d894b

Mark the completion from the worker thread (#20719)

Mark completion in uv worker instead of callback

Stelios Fragkakis committed Jul 23, 2025 at 00:42 UTC 5b20d894b857c074eb733885ec890514b9a2c9a0
1 file changed +1 -3
src/database/engine/rrdengine.c
+1 -3
@@ -953,9 +953,6 @@ datafile_extent_build(struct rrdengine_instance *ctx, struct page_descr_with_dat
953
954 static void after_extent_write(struct rrdengine_instance *ctx __maybe_unused, void *data __maybe_unused, struct completion *completion __maybe_unused, uv_work_t* uv_work_req __maybe_unused, int status __maybe_unused)
955 {
956 - if(completion)
957 - completion_mark_complete(completion);
958 -
956 check_and_schedule_db_rotation(ctx);
957 }
958
@@ -1010,6 +1007,7 @@ static void *extent_write_tp_worker(
1007
1008 done:
1009 __atomic_sub_fetch(&ctx->atomic.extents_currently_being_flushed, 1, __ATOMIC_RELAXED);
1010 + completion_mark_complete(completion);
1011 worker_is_idle();
1012 return NULL;
1013 }