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:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-26 18:05:42 +0000
commit112b5b91647c3dea45cc1c9bc364df526c8012f1 (patch)
tree450af925135ec664c4310a1eb28b69481094ee2a /database/sqlite/sqlite_aclk.c
parentReleasing debian version 1.32.1-2. (diff)
downloadnetdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.tar.xz
netdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.zip
Merging upstream version 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 6803092f..63196a81 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();