summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-04 08:57:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-04 08:57:43 +0000
commit42ad44d1fea072d23f2e0067bca4ba6bc0b2a523 (patch)
treeb1c1459c6914f1d4c5b123b601b9dbecb049360c /database
parentAdding upstream version 1.42.1. (diff)
downloadnetdata-9eadf8a4d066b0ad6e8937fcf8668fc43fb328f4.tar.xz
netdata-9eadf8a4d066b0ad6e8937fcf8668fc43fb328f4.zip
Adding upstream version 1.42.2.upstream/1.42.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database')
-rw-r--r--database/rrd.h4
-rw-r--r--database/rrdhost.c3
-rw-r--r--database/sqlite/sqlite_aclk_alert.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/database/rrd.h b/database/rrd.h
index ea211f64..d64f5904 100644
--- a/database/rrd.h
+++ b/database/rrd.h
@@ -891,9 +891,11 @@ struct rrdset {
} alerts;
struct {
+ SPINLOCK spinlock; // used only for cleanup
+ pid_t collector_tid;
+ bool set;
uint32_t pos;
uint32_t size;
- uint32_t used;
RRDDIM_ACQUIRED **rda;
} pluginsd;
diff --git a/database/rrdhost.c b/database/rrdhost.c
index 235d64b1..bec821cc 100644
--- a/database/rrdhost.c
+++ b/database/rrdhost.c
@@ -509,7 +509,8 @@ int is_legacy = 1;
if(t != host) {
netdata_log_error("Host '%s': cannot add host with machine guid '%s' to index. It already exists as host '%s' with machine guid '%s'.",
rrdhost_hostname(host), host->machine_guid, rrdhost_hostname(t), t->machine_guid);
- rrdhost_free___while_having_rrd_wrlock(host, true);
+ if (!is_localhost)
+ rrdhost_free___while_having_rrd_wrlock(host, true);
rrd_unlock();
return NULL;
}
diff --git a/database/sqlite/sqlite_aclk_alert.c b/database/sqlite/sqlite_aclk_alert.c
index f10a866f..20ca0573 100644
--- a/database/sqlite/sqlite_aclk_alert.c
+++ b/database/sqlite/sqlite_aclk_alert.c
@@ -850,7 +850,7 @@ static int have_recent_alarm(RRDHOST *host, uint32_t alarm_id, uint32_t mark)
}
#endif
-#define ALARM_EVENTS_PER_CHUNK 10
+#define ALARM_EVENTS_PER_CHUNK 1000
void aclk_push_alert_snapshot_event(char *node_id __maybe_unused)
{
#ifdef ENABLE_ACLK