summaryrefslogtreecommitdiffstats
path: root/database/sqlite/sqlite_aclk.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-26 18:05:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-26 18:05:10 +0000
commit34a0b66bc2d48223748ed1cf5bc1b305c396bd74 (patch)
treefbd36be86cc6bc4288fe627f2b5beada569848bb /database/sqlite/sqlite_aclk.c
parentAdding upstream version 1.32.1. (diff)
downloadnetdata-34a0b66bc2d48223748ed1cf5bc1b305c396bd74.tar.xz
netdata-34a0b66bc2d48223748ed1cf5bc1b305c396bd74.zip
Adding upstream version 1.33.0.upstream/1.33.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/sqlite/sqlite_aclk.c')
-rw-r--r--database/sqlite/sqlite_aclk.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/database/sqlite/sqlite_aclk.c b/database/sqlite/sqlite_aclk.c
index 6803092f2..63196a81e 100644
--- a/database/sqlite/sqlite_aclk.c
+++ b/database/sqlite/sqlite_aclk.c
@@ -189,6 +189,24 @@ int aclk_worker_enq_cmd(char *node_id, struct aclk_database_cmd *cmd)
return (wc == NULL);
}
+struct aclk_database_worker_config *find_inactive_wc_by_node_id(char *node_id)
+{
+ if (unlikely(!node_id))
+ return NULL;
+
+ uv_mutex_lock(&aclk_async_lock);
+ struct aclk_database_worker_config *wc = aclk_thread_head;
+
+ while (wc) {
+ if (!strcmp(wc->node_id, node_id))
+ break;
+ wc = wc->next;
+ }
+ uv_mutex_unlock(&aclk_async_lock);
+
+ return (wc);
+}
+
void aclk_sync_exit_all()
{
rrd_wrlock();