summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-26 17:10:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-26 17:10:18 +0000
commitbb3cae2edeb7b698c9dfcbe74df9eb17d03c771b (patch)
tree55748ed1435e5a5221b91426ecd284ffa1fe7094
parentReleasing debian version 1.43.0-1. (diff)
downloadnetdata-bb3cae2edeb7b698c9dfcbe74df9eb17d03c771b.tar.xz
netdata-bb3cae2edeb7b698c9dfcbe74df9eb17d03c771b.zip
Merging upstream version 1.43.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--CHANGELOG.md98
-rw-r--r--collectors/cgroups.plugin/sys_fs_cgroup.c63
-rw-r--r--daemon/main.c1
-rw-r--r--database/engine/rrdengine.c4
-rw-r--r--database/engine/rrdengine.h2
-rw-r--r--database/rrd.h2
-rw-r--r--database/rrddim.c2
-rw-r--r--database/rrdlabels.c204
-rwxr-xr-xhealth/notifications/alarm-notify.sh.in2
-rw-r--r--libnetdata/dictionary/dictionary.c13
-rw-r--r--libnetdata/dictionary/dictionary.h2
-rw-r--r--libnetdata/facets/facets.c27
-rw-r--r--libnetdata/simple_pattern/simple_pattern.c8
-rw-r--r--packaging/go.d.checksums32
-rw-r--r--packaging/go.d.version2
-rw-r--r--packaging/version2
-rw-r--r--streaming/sender.c6
-rw-r--r--web/api/queries/query.c6
18 files changed, 327 insertions, 149 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d7cbcc4f3..6634decec 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,57 @@
# Changelog
+## [v1.43.1](https://github.com/netdata/netdata/tree/v1.43.1) (2023-10-26)
+
+[Full Changelog](https://github.com/netdata/netdata/compare/v1.43.0...v1.43.1)
+
+**Merged pull requests:**
+
+- Prevent wrong optimization armv7l static build [\#16274](https://github.com/netdata/netdata/pull/16274) ([stelfrag](https://github.com/stelfrag))
+- DYNCFG fix REPORT\_JOB\_STATUS streaming [\#16272](https://github.com/netdata/netdata/pull/16272) ([underhood](https://github.com/underhood))
+- fix sources match [\#16271](https://github.com/netdata/netdata/pull/16271) ([ktsaou](https://github.com/ktsaou))
+- journal minor updates [\#16267](https://github.com/netdata/netdata/pull/16267) ([ktsaou](https://github.com/ktsaou))
+- Fix coverity issue 403725 [\#16265](https://github.com/netdata/netdata/pull/16265) ([stelfrag](https://github.com/stelfrag))
+- SUBSTRING simple patterns fix [\#16264](https://github.com/netdata/netdata/pull/16264) ([ktsaou](https://github.com/ktsaou))
+- QUERIES: use tiers only when they have useful data [\#16263](https://github.com/netdata/netdata/pull/16263) ([ktsaou](https://github.com/ktsaou))
+- cgroup: add net container\_device label [\#16261](https://github.com/netdata/netdata/pull/16261) ([ilyam8](https://github.com/ilyam8))
+- Regenerate integrations.js [\#16258](https://github.com/netdata/netdata/pull/16258) ([netdatabot](https://github.com/netdatabot))
+- Fix Discord webhook payload [\#16257](https://github.com/netdata/netdata/pull/16257) ([luchaos](https://github.com/luchaos))
+- Fix HAProxy server status parsing and add MAINT status chart [\#16253](https://github.com/netdata/netdata/pull/16253) ([seniorquico](https://github.com/seniorquico))
+- Journal multiple sources [\#16252](https://github.com/netdata/netdata/pull/16252) ([ktsaou](https://github.com/ktsaou))
+- `most_popular` on markdown metadata for integrations [\#16251](https://github.com/netdata/netdata/pull/16251) ([Ancairon](https://github.com/Ancairon))
+- Dyncfg improvements [\#16250](https://github.com/netdata/netdata/pull/16250) ([ktsaou](https://github.com/ktsaou))
+- Fix label copy to correctly handle duplicate keys [\#16249](https://github.com/netdata/netdata/pull/16249) ([stelfrag](https://github.com/stelfrag))
+- added systemd-journal forward\_secure\_sealing [\#16247](https://github.com/netdata/netdata/pull/16247) ([ktsaou](https://github.com/ktsaou))
+- Terminate cgroups discovery thread faster during shutdown [\#16246](https://github.com/netdata/netdata/pull/16246) ([stelfrag](https://github.com/stelfrag))
+- python.d\(smartd\_log\): collect Total LBAs written/read [\#16245](https://github.com/netdata/netdata/pull/16245) ([watsonbox](https://github.com/watsonbox))
+- fix apps plugin metric names in meta [\#16243](https://github.com/netdata/netdata/pull/16243) ([ilyam8](https://github.com/ilyam8))
+- Drop an unused index from aclk\_alert table [\#16242](https://github.com/netdata/netdata/pull/16242) ([stelfrag](https://github.com/stelfrag))
+- add DYNCFG\_RESET [\#16241](https://github.com/netdata/netdata/pull/16241) ([underhood](https://github.com/underhood))
+- Reuse ML load prepared statement [\#16240](https://github.com/netdata/netdata/pull/16240) ([stelfrag](https://github.com/stelfrag))
+- update bundled UI to v6.53.0 [\#16239](https://github.com/netdata/netdata/pull/16239) ([ilyam8](https://github.com/ilyam8))
+- Regenerate integrations.js [\#16237](https://github.com/netdata/netdata/pull/16237) ([netdatabot](https://github.com/netdatabot))
+- Active journal centralization guide no encryption [\#16236](https://github.com/netdata/netdata/pull/16236) ([tkatsoulas](https://github.com/tkatsoulas))
+- journal: script to generate self-signed-certificates [\#16235](https://github.com/netdata/netdata/pull/16235) ([ktsaou](https://github.com/ktsaou))
+- Fix dimension HETEROGENEOUS check [\#16234](https://github.com/netdata/netdata/pull/16234) ([stelfrag](https://github.com/stelfrag))
+- uninstaller: remove /etc/cron.d/netdata-updater-daily [\#16233](https://github.com/netdata/netdata/pull/16233) ([ilyam8](https://github.com/ilyam8))
+- Add Erlang to Apps configuration [\#16231](https://github.com/netdata/netdata/pull/16231) ([andyundso](https://github.com/andyundso))
+- remove charts.d/nut [\#16230](https://github.com/netdata/netdata/pull/16230) ([ilyam8](https://github.com/ilyam8))
+- kickstart: rename auto-update-method to auto-update-type [\#16229](https://github.com/netdata/netdata/pull/16229) ([ilyam8](https://github.com/ilyam8))
+- update go.d plugin version to v0.56.3 [\#16228](https://github.com/netdata/netdata/pull/16228) ([ilyam8](https://github.com/ilyam8))
+- Add document outlining our versioning policy and public API. [\#16227](https://github.com/netdata/netdata/pull/16227) ([Ferroin](https://github.com/Ferroin))
+- Changes to `systemd-journal` docs [\#16225](https://github.com/netdata/netdata/pull/16225) ([Ancairon](https://github.com/Ancairon))
+- Fix statistics calculation in 32bit systems [\#16222](https://github.com/netdata/netdata/pull/16222) ([stelfrag](https://github.com/stelfrag))
+- Fix meta unittest [\#16221](https://github.com/netdata/netdata/pull/16221) ([stelfrag](https://github.com/stelfrag))
+- facets: minimize hashtable collisions [\#16215](https://github.com/netdata/netdata/pull/16215) ([ktsaou](https://github.com/ktsaou))
+- Improve context load on startup [\#16203](https://github.com/netdata/netdata/pull/16203) ([stelfrag](https://github.com/stelfrag))
+- cgroup-network: don't log an error opening pid file if doesn't exist [\#16196](https://github.com/netdata/netdata/pull/16196) ([ilyam8](https://github.com/ilyam8))
+- docker install: support for Proxmox vms/containers name resolution [\#16193](https://github.com/netdata/netdata/pull/16193) ([ilyam8](https://github.com/ilyam8))
+- Introduce workflow to always update bundled packages \(static builds\) into their latest release \(part1\) [\#16191](https://github.com/netdata/netdata/pull/16191) ([tkatsoulas](https://github.com/tkatsoulas))
+- Improvements for labels handling [\#16172](https://github.com/netdata/netdata/pull/16172) ([stelfrag](https://github.com/stelfrag))
+- Add info to native packages docs about mirroring our repos. [\#16069](https://github.com/netdata/netdata/pull/16069) ([Ferroin](https://github.com/Ferroin))
+- shutdown while waiting for collectors to finish [\#16023](https://github.com/netdata/netdata/pull/16023) ([ktsaou](https://github.com/ktsaou))
+- Add integrations JSON file for website usage. [\#15959](https://github.com/netdata/netdata/pull/15959) ([Ferroin](https://github.com/Ferroin))
+
## [v1.43.0](https://github.com/netdata/netdata/tree/v1.43.0) (2023-10-16)
[Full Changelog](https://github.com/netdata/netdata/compare/v1.42.4...v1.43.0)
@@ -271,7 +323,6 @@
- Added CentOS-Stream to distros [\#15742](https://github.com/netdata/netdata/pull/15742) ([k0ste](https://github.com/k0ste))
- Unconditionally delete very old models. [\#15720](https://github.com/netdata/netdata/pull/15720) ([vkalintiris](https://github.com/vkalintiris))
- Misc code cleanup [\#15665](https://github.com/netdata/netdata/pull/15665) ([stelfrag](https://github.com/stelfrag))
-- Documentation for Dynamic Configuration [\#15643](https://github.com/netdata/netdata/pull/15643) ([underhood](https://github.com/underhood))
## [v1.42.4](https://github.com/netdata/netdata/tree/v1.42.4) (2023-09-18)
@@ -376,51 +427,6 @@
- Fix table formatting \(custom exporter\) [\#15668](https://github.com/netdata/netdata/pull/15668) ([shyamvalsan](https://github.com/shyamvalsan))
- Fix icon prometheus exporter icon [\#15666](https://github.com/netdata/netdata/pull/15666) ([hugovalente-pm](https://github.com/hugovalente-pm))
- freeipmi change restart message to info [\#15664](https://github.com/netdata/netdata/pull/15664) ([ilyam8](https://github.com/ilyam8))
-- fix proc.plugin meta filename [\#15659](https://github.com/netdata/netdata/pull/15659) ([ilyam8](https://github.com/ilyam8))
-- small improvements to README.md [\#15658](https://github.com/netdata/netdata/pull/15658) ([ilyam8](https://github.com/ilyam8))
-- Fix icon for solarwinds [\#15657](https://github.com/netdata/netdata/pull/15657) ([hugovalente-pm](https://github.com/hugovalente-pm))
-- Fix Apps plugin icons [\#15655](https://github.com/netdata/netdata/pull/15655) ([hugovalente-pm](https://github.com/hugovalente-pm))
-- fix pandas category [\#15654](https://github.com/netdata/netdata/pull/15654) ([andrewm4894](https://github.com/andrewm4894))
-- Fix exporter icons [\#15652](https://github.com/netdata/netdata/pull/15652) ([shyamvalsan](https://github.com/shyamvalsan))
-- disable freeipmi in docker by default [\#15651](https://github.com/netdata/netdata/pull/15651) ([ilyam8](https://github.com/ilyam8))
-- Fixing FreeBSD icons [\#15650](https://github.com/netdata/netdata/pull/15650) ([shyamvalsan](https://github.com/shyamvalsan))
-- Fix exporter schema to support multiple entries per file. [\#15649](https://github.com/netdata/netdata/pull/15649) ([Ferroin](https://github.com/Ferroin))
-- Fixing icons in netdata/netdata repo [\#15647](https://github.com/netdata/netdata/pull/15647) ([shyamvalsan](https://github.com/shyamvalsan))
-- Fix name in the yaml of example python collector [\#15646](https://github.com/netdata/netdata/pull/15646) ([Ancairon](https://github.com/Ancairon))
-- Fix icons [\#15645](https://github.com/netdata/netdata/pull/15645) ([hugovalente-pm](https://github.com/hugovalente-pm))
-- Fix icons for notifications [\#15644](https://github.com/netdata/netdata/pull/15644) ([shyamvalsan](https://github.com/shyamvalsan))
-- convert collectors meta files from single to multi [\#15642](https://github.com/netdata/netdata/pull/15642) ([ilyam8](https://github.com/ilyam8))
-- fix edit-config for containerized Netdata when running from host [\#15641](https://github.com/netdata/netdata/pull/15641) ([ilyam8](https://github.com/ilyam8))
-- fix: 🐛 docker bind-mount stock files creation [\#15639](https://github.com/netdata/netdata/pull/15639) ([Leny1996](https://github.com/Leny1996))
-- The icon\_filename value was not in quotes - Fixed [\#15635](https://github.com/netdata/netdata/pull/15635) ([sashwathn](https://github.com/sashwathn))
-- Update graphite metadata.yaml [\#15634](https://github.com/netdata/netdata/pull/15634) ([shyamvalsan](https://github.com/shyamvalsan))
-- Debugfs yaml update [\#15633](https://github.com/netdata/netdata/pull/15633) ([thiagoftsm](https://github.com/thiagoftsm))
-- Update metadata.yaml [\#15632](https://github.com/netdata/netdata/pull/15632) ([shyamvalsan](https://github.com/shyamvalsan))
-- review images for integrations from security to windows systems [\#15630](https://github.com/netdata/netdata/pull/15630) ([hugovalente-pm](https://github.com/hugovalente-pm))
-- bump ui to v6.23.0 [\#15629](https://github.com/netdata/netdata/pull/15629) ([ilyam8](https://github.com/ilyam8))
-- Updated Cloud Notification Integrations with the new schema [\#15628](https://github.com/netdata/netdata/pull/15628) ([sashwathn](https://github.com/sashwathn))
-- Add additional variable section to instance data in schema. [\#15627](https://github.com/netdata/netdata/pull/15627) ([Ferroin](https://github.com/Ferroin))
-- fix icons for message brokers and hardware [\#15626](https://github.com/netdata/netdata/pull/15626) ([hugovalente-pm](https://github.com/hugovalente-pm))
-- Add key for notifications to control what global config options get displayed [\#15625](https://github.com/netdata/netdata/pull/15625) ([Ferroin](https://github.com/Ferroin))
-- fix icons for webservers integrations [\#15624](https://github.com/netdata/netdata/pull/15624) ([hugovalente-pm](https://github.com/hugovalente-pm))
-- Add notification metadata for agent notifications [\#15622](https://github.com/netdata/netdata/pull/15622) ([shyamvalsan](https://github.com/shyamvalsan))
-- fix icons for db integrations [\#15621](https://github.com/netdata/netdata/pull/15621) ([hugovalente-pm](https://github.com/hugovalente-pm))
-- Rename multi\_metadata.yaml to metadata.yaml [\#15619](https://github.com/netdata/netdata/pull/15619) ([shyamvalsan](https://github.com/shyamvalsan))
-- Rename multi\_metadata.yaml to metadata.yaml [\#15618](https://github.com/netdata/netdata/pull/15618) ([shyamvalsan](https://github.com/shyamvalsan))
-- Fix up notification schema to better support cloud notifications. [\#15616](https://github.com/netdata/netdata/pull/15616) ([Ferroin](https://github.com/Ferroin))
-- Updated all cloud notifications except generic webhook [\#15615](https://github.com/netdata/netdata/pull/15615) ([sashwathn](https://github.com/sashwathn))
-- prefer titles, families, units and priorities from collected charts [\#15614](https://github.com/netdata/netdata/pull/15614) ([ktsaou](https://github.com/ktsaou))
-- Update categories.yaml to add notifications [\#15613](https://github.com/netdata/netdata/pull/15613) ([sashwathn](https://github.com/sashwathn))
-- ci disable yamllint line-length check [\#15612](https://github.com/netdata/netdata/pull/15612) ([ilyam8](https://github.com/ilyam8))
-- Fix descriptions in config objects, make them single line [\#15610](https://github.com/netdata/netdata/pull/15610) ([Ancairon](https://github.com/Ancairon))
-- Update icons [\#15609](https://github.com/netdata/netdata/pull/15609) ([shyamvalsan](https://github.com/shyamvalsan))
-- Update icon [\#15608](https://github.com/netdata/netdata/pull/15608) ([shyamvalsan](https://github.com/shyamvalsan))
-- Update icon [\#15607](https://github.com/netdata/netdata/pull/15607) ([shyamvalsan](https://github.com/shyamvalsan))
-- Update documentation [\#15606](https://github.com/netdata/netdata/pull/15606) ([kiela](https://github.com/kiela))
-- fix potential crash bug. [\#15605](https://github.com/netdata/netdata/pull/15605) ([icy17](https://github.com/icy17))
-- FreeBSD yaml update [\#15603](https://github.com/netdata/netdata/pull/15603) ([thiagoftsm](https://github.com/thiagoftsm))
-- Macos yaml update [\#15602](https://github.com/netdata/netdata/pull/15602) ([thiagoftsm](https://github.com/thiagoftsm))
-- minor changes in README.md [\#15601](https://github.com/netdata/netdata/pull/15601) ([tkatsoulas](https://github.com/tkatsoulas))
## [v1.41.0](https://github.com/netdata/netdata/tree/v1.41.0) (2023-07-19)
diff --git a/collectors/cgroups.plugin/sys_fs_cgroup.c b/collectors/cgroups.plugin/sys_fs_cgroup.c
index 3bb8e7d3e..6196e7603 100644
--- a/collectors/cgroups.plugin/sys_fs_cgroup.c
+++ b/collectors/cgroups.plugin/sys_fs_cgroup.c
@@ -895,7 +895,6 @@ struct discovery_thread {
uv_thread_t thread;
uv_mutex_t mutex;
uv_cond_t cond_var;
- int start_discovery;
int exited;
} discovery_thread;
@@ -2781,14 +2780,6 @@ static inline void discovery_find_all_cgroups() {
netdata_log_debug(D_CGROUP, "done searching for cgroups");
}
-static void cgroup_discovery_cleanup(void *ptr) {
- UNUSED(ptr);
-
- discovery_thread.exited = 1;
- worker_unregister();
- service_exits();
-}
-
static inline char *cgroup_chart_type(char *buffer, struct cgroup *cg) {
if(buffer[0]) return buffer;
@@ -2806,8 +2797,6 @@ void cgroup_discovery_worker(void *ptr)
{
UNUSED(ptr);
- netdata_thread_cleanup_push(cgroup_discovery_cleanup, ptr);
-
worker_register("CGROUPSDISC");
worker_register_job_name(WORKER_DISCOVERY_INIT, "init");
worker_register_job_name(WORKER_DISCOVERY_FIND, "find");
@@ -2827,13 +2816,13 @@ void cgroup_discovery_worker(void *ptr)
NULL,
SIMPLE_PATTERN_EXACT, true);
+ service_register(SERVICE_THREAD_TYPE_LIBUV, NULL, NULL, NULL, false);
+
while (service_running(SERVICE_COLLECTORS)) {
worker_is_idle();
uv_mutex_lock(&discovery_thread.mutex);
- while (!discovery_thread.start_discovery && service_running(SERVICE_COLLECTORS))
- uv_cond_wait(&discovery_thread.cond_var, &discovery_thread.mutex);
- discovery_thread.start_discovery = 0;
+ uv_cond_wait(&discovery_thread.cond_var, &discovery_thread.mutex);
uv_mutex_unlock(&discovery_thread.mutex);
if (unlikely(!service_running(SERVICE_COLLECTORS)))
@@ -2841,8 +2830,10 @@ void cgroup_discovery_worker(void *ptr)
discovery_find_all_cgroups();
}
-
- netdata_thread_cleanup_pop(1);
+ collector_info("discovery thread stopped");
+ worker_unregister();
+ service_exits();
+ __atomic_store_n(&discovery_thread.exited,1,__ATOMIC_RELAXED);
}
// ----------------------------------------------------------------------------
@@ -4569,19 +4560,15 @@ static void cgroup_main_cleanup(void *ptr) {
usec_t max = 2 * USEC_PER_SEC, step = 50000;
- if (!discovery_thread.exited) {
- collector_info("stopping discovery thread worker");
- uv_mutex_lock(&discovery_thread.mutex);
- discovery_thread.start_discovery = 1;
- uv_cond_signal(&discovery_thread.cond_var);
- uv_mutex_unlock(&discovery_thread.mutex);
- }
-
- collector_info("waiting for discovery thread to finish...");
-
- while (!discovery_thread.exited && max > 0) {
- max -= step;
- sleep_usec(step);
+ if (!__atomic_load_n(&discovery_thread.exited, __ATOMIC_RELAXED)) {
+ collector_info("waiting for discovery thread to finish...");
+ while (!__atomic_load_n(&discovery_thread.exited, __ATOMIC_RELAXED) && max > 0) {
+ uv_mutex_lock(&discovery_thread.mutex);
+ uv_cond_signal(&discovery_thread.cond_var);
+ uv_mutex_unlock(&discovery_thread.mutex);
+ max -= step;
+ sleep_usec(step);
+ }
}
if (shm_mutex_cgroup_ebpf != SEM_FAILED) {
@@ -4621,8 +4608,6 @@ void *cgroups_main(void *ptr) {
goto exit;
}
- // dispatch a discovery worker thread
- discovery_thread.start_discovery = 0;
discovery_thread.exited = 0;
if (uv_mutex_init(&discovery_thread.mutex)) {
@@ -4646,6 +4631,7 @@ void *cgroups_main(void *ptr) {
usec_t step = cgroup_update_every * USEC_PER_SEC;
usec_t find_every = cgroup_check_for_new_every * USEC_PER_SEC, find_dt = 0;
+ netdata_thread_disable_cancelability();
while(service_running(SERVICE_COLLECTORS)) {
worker_is_idle();
@@ -4654,8 +4640,9 @@ void *cgroups_main(void *ptr) {
find_dt += hb_dt;
if (unlikely(find_dt >= find_every || (!is_inside_k8s && cgroups_check))) {
+ uv_mutex_lock(&discovery_thread.mutex);
uv_cond_signal(&discovery_thread.cond_var);
- discovery_thread.start_discovery = 1;
+ uv_mutex_unlock(&discovery_thread.mutex);
find_dt = 0;
cgroups_check = 0;
}
@@ -4665,18 +4652,22 @@ void *cgroups_main(void *ptr) {
worker_is_busy(WORKER_CGROUPS_READ);
read_all_discovered_cgroups(cgroup_root);
- if(unlikely(!service_running(SERVICE_COLLECTORS))) break;
-
+ if (unlikely(!service_running(SERVICE_COLLECTORS))) {
+ uv_mutex_unlock(&cgroup_root_mutex);
+ break;
+ }
worker_is_busy(WORKER_CGROUPS_CHART);
update_cgroup_charts(cgroup_update_every);
- if(unlikely(!service_running(SERVICE_COLLECTORS))) break;
+ if (unlikely(!service_running(SERVICE_COLLECTORS))) {
+ uv_mutex_unlock(&cgroup_root_mutex);
+ break;
+ }
worker_is_idle();
uv_mutex_unlock(&cgroup_root_mutex);
}
exit:
- worker_unregister();
netdata_thread_cleanup_pop(1);
return NULL;
}
diff --git a/daemon/main.c b/daemon/main.c
index ab7997969..5d25f88b5 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -449,6 +449,7 @@ void netdata_cleanup_and_exit(int ret) {
error_limit_static_thread_var(erl, 1, 100 * USEC_PER_MS);
error_limit(&erl, "waiting for %zu collectors to finish", running);
// sleep_usec(100 * USEC_PER_MS);
+ cleanup_destroyed_dictionaries();
}
}
diff --git a/database/engine/rrdengine.c b/database/engine/rrdengine.c
index ce363183d..99257b79d 100644
--- a/database/engine/rrdengine.c
+++ b/database/engine/rrdengine.c
@@ -1427,8 +1427,8 @@ static void *query_prep_tp_worker(struct rrdengine_instance *ctx __maybe_unused,
return data;
}
-unsigned rrdeng_target_data_file_size(struct rrdengine_instance *ctx) {
- unsigned target_size = ctx->config.max_disk_space / TARGET_DATAFILES;
+uint64_t rrdeng_target_data_file_size(struct rrdengine_instance *ctx) {
+ uint64_t target_size = ctx->config.max_disk_space / TARGET_DATAFILES;
target_size = MIN(target_size, MAX_DATAFILE_SIZE);
target_size = MAX(target_size, MIN_DATAFILE_SIZE);
return target_size;
diff --git a/database/engine/rrdengine.h b/database/engine/rrdengine.h
index b5476930a..08eaf4128 100644
--- a/database/engine/rrdengine.h
+++ b/database/engine/rrdengine.h
@@ -476,7 +476,7 @@ void pdc_route_synchronously(struct rrdengine_instance *ctx, struct page_details
void pdc_acquire(PDC *pdc);
bool pdc_release_and_destroy_if_unreferenced(PDC *pdc, bool worker, bool router);
-unsigned rrdeng_target_data_file_size(struct rrdengine_instance *ctx);
+uint64_t rrdeng_target_data_file_size(struct rrdengine_instance *ctx);
struct page_descr_with_data *page_descriptor_get(void);
diff --git a/database/rrd.h b/database/rrd.h
index 197ec45cb..9c5ad6f2f 100644
--- a/database/rrd.h
+++ b/database/rrd.h
@@ -465,7 +465,7 @@ static inline uint64_t storage_engine_disk_space_max(STORAGE_ENGINE_BACKEND back
}
uint64_t rrdeng_disk_space_used(STORAGE_INSTANCE *db_instance);
-static inline size_t storage_engine_disk_space_used(STORAGE_ENGINE_BACKEND backend __maybe_unused, STORAGE_INSTANCE *db_instance __maybe_unused) {
+static inline uint64_t storage_engine_disk_space_used(STORAGE_ENGINE_BACKEND backend __maybe_unused, STORAGE_INSTANCE *db_instance __maybe_unused) {
#ifdef ENABLE_DBENGINE
if(likely(backend == STORAGE_ENGINE_BACKEND_DBENGINE))
return rrdeng_disk_space_used(db_instance);
diff --git a/database/rrddim.c b/database/rrddim.c
index 0f99f98df..cae88674d 100644
--- a/database/rrddim.c
+++ b/database/rrddim.c
@@ -126,7 +126,7 @@ static void rrddim_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, v
if(rrdset_number_of_dimensions(st) != 0) {
RRDDIM *td;
dfe_start_write(st->rrddim_root_index, td) {
- if(!td) break;
+ if(td) break;
}
dfe_done(td);
diff --git a/database/rrdlabels.c b/database/rrdlabels.c
index 243b16c69..75167cb24 100644
--- a/database/rrdlabels.c
+++ b/database/rrdlabels.c
@@ -671,6 +671,7 @@ void rrdlabels_destroy(RRDLABELS *labels)
freez(labels);
}
+// Check in labels to see if we have the key specified in label
static RRDLABEL *rrdlabels_find_label_with_key_unsafe(RRDLABELS *labels, RRDLABEL *label)
{
if (unlikely(!labels))
@@ -682,7 +683,7 @@ static RRDLABEL *rrdlabels_find_label_with_key_unsafe(RRDLABELS *labels, RRDLABE
RRDLABEL *found = NULL;
while ((PValue = JudyLFirstThenNext(labels->JudyL, &Index, &first_then_next))) {
RRDLABEL *lb = (RRDLABEL *)Index;
- if (lb->index.key == label->index.key && lb->index.value != label->index.value) {
+ if (lb->index.key == label->index.key) {
found = (RRDLABEL *)Index;
break;
}
@@ -695,39 +696,42 @@ static RRDLABEL *rrdlabels_find_label_with_key_unsafe(RRDLABELS *labels, RRDLABE
static void labels_add_already_sanitized(RRDLABELS *labels, const char *key, const char *value, RRDLABEL_SRC ls)
{
- RRDLABEL *label = add_label_name_value(key, value);
+ RRDLABEL *new_label = add_label_name_value(key, value);
spinlock_lock(&labels->spinlock);
- RRDLABEL *old_key = rrdlabels_find_label_with_key_unsafe(labels, label);
+ RRDLABEL *old_label_with_key = rrdlabels_find_label_with_key_unsafe(labels, new_label);
+
+ if (old_label_with_key == new_label) {
+ spinlock_unlock(&labels->spinlock);
+ delete_label(new_label);
+ return;
+ }
size_t mem_before_judyl = JudyLMemUsed(labels->JudyL);
- Pvoid_t *PValue = JudyLIns(&labels->JudyL, (Word_t) label, PJE0);
- if(unlikely(!PValue || PValue == PJERR))
+ Pvoid_t *PValue = JudyLIns(&labels->JudyL, (Word_t)new_label, PJE0);
+ if (!PValue || PValue == PJERR)
fatal("RRDLABELS: corrupted labels JudyL array");
- if (!*PValue) {
- RRDLABEL_SRC new_ls;
- if (old_key)
- new_ls = ((ls & ~(RRDLABEL_FLAG_NEW | RRDLABEL_FLAG_OLD)) | RRDLABEL_FLAG_OLD);
- else
- new_ls = ((ls & ~(RRDLABEL_FLAG_NEW | RRDLABEL_FLAG_OLD)) | RRDLABEL_FLAG_NEW);
- *((RRDLABEL_SRC *)PValue) = new_ls;
+ RRDLABEL_SRC new_ls = (ls & ~(RRDLABEL_FLAG_NEW | RRDLABEL_FLAG_OLD));
+ labels->version++;
- labels->version++;
+ if (old_label_with_key) {
+ (void)JudyLDel(&labels->JudyL, (Word_t)old_label_with_key, PJE0);
+ new_ls |= RRDLABEL_FLAG_OLD;
+ } else
+ new_ls |= RRDLABEL_FLAG_NEW;
- if (old_key) {
- (void)JudyLDel(&labels->JudyL, (Word_t) old_key, PJE0);
- delete_label((RRDLABEL *)old_key);
- }
- size_t mem_after_judyl = JudyLMemUsed(labels->JudyL);
- STATS_PLUS_MEMORY(&dictionary_stats_category_rrdlabels, 0, mem_after_judyl - mem_before_judyl, 0);
- }
- else
- delete_label(label);
+ *((RRDLABEL_SRC *)PValue) = new_ls;
+
+ size_t mem_after_judyl = JudyLMemUsed(labels->JudyL);
+ STATS_PLUS_MEMORY(&dictionary_stats_category_rrdlabels, 0, mem_after_judyl - mem_before_judyl, 0);
spinlock_unlock(&labels->spinlock);
+
+ if (old_label_with_key)
+ delete_label((RRDLABEL *)old_label_with_key);
}
void rrdlabels_add(RRDLABELS *labels, const char *name, const char *value, RRDLABEL_SRC ls)
@@ -984,7 +988,7 @@ int rrdlabels_walkthrough_read(RRDLABELS *labels, int (*callback)(const char *na
// migrate an existing label list to a new list
void rrdlabels_migrate_to_these(RRDLABELS *dst, RRDLABELS *src) {
- if (!dst || !src)
+ if (!dst || !src || (dst == src))
return;
spinlock_lock(&dst->spinlock);
@@ -1025,7 +1029,7 @@ void rrdlabels_migrate_to_these(RRDLABELS *dst, RRDLABELS *src) {
void rrdlabels_copy(RRDLABELS *dst, RRDLABELS *src)
{
- if (!dst || !src)
+ if (!dst || !src || (dst == src))
return;
RRDLABEL *label;
@@ -1034,23 +1038,34 @@ void rrdlabels_copy(RRDLABELS *dst, RRDLABELS *src)
spinlock_lock(&dst->spinlock);
spinlock_lock(&src->spinlock);
+ size_t mem_before_judyl = JudyLMemUsed(dst->JudyL);
+ bool update_statistics = false;
lfe_start_nolock(src, label, ls)
{
- size_t mem_before_judyl = JudyLMemUsed(dst->JudyL);
+ RRDLABEL *old_label_with_key = rrdlabels_find_label_with_key_unsafe(dst, label);
+ if (old_label_with_key && old_label_with_key == label)
+ continue;
+
Pvoid_t *PValue = JudyLIns(&dst->JudyL, (Word_t)label, PJE0);
if(unlikely(!PValue || PValue == PJERR))
fatal("RRDLABELS: corrupted labels array");
if (!*PValue) {
dup_label(label);
- size_t mem_after_judyl = JudyLMemUsed(dst->JudyL);
- STATS_PLUS_MEMORY(&dictionary_stats_category_rrdlabels, 0, mem_after_judyl - mem_before_judyl, 0);
*((RRDLABEL_SRC *)PValue) = ls;
+ dst->version++;
+ update_statistics = true;
+ if (old_label_with_key) {
+ (void)JudyLDel(&dst->JudyL, (Word_t)old_label_with_key, PJE0);
+ delete_label((RRDLABEL *)old_label_with_key);
+ }
}
}
lfe_done_nolock();
-
- dst->version = src->version;
+ if (update_statistics) {
+ size_t mem_after_judyl = JudyLMemUsed(dst->JudyL);
+ STATS_PLUS_MEMORY(&dictionary_stats_category_rrdlabels, 0, mem_after_judyl - mem_before_judyl, 0);
+ }
spinlock_unlock(&src->spinlock);
spinlock_unlock(&dst->spinlock);
@@ -1265,6 +1280,9 @@ void rrdlabels_to_buffer_json_members(RRDLABELS *labels, BUFFER *wb)
size_t rrdlabels_entries(RRDLABELS *labels __maybe_unused)
{
+ if (unlikely(!labels))
+ return 0;
+
size_t count;
spinlock_lock(&labels->spinlock);
count = JudyLCount(labels->JudyL, 0, -1, PJE0);
@@ -1274,6 +1292,9 @@ size_t rrdlabels_entries(RRDLABELS *labels __maybe_unused)
size_t rrdlabels_version(RRDLABELS *labels __maybe_unused)
{
+ if (unlikely(!labels))
+ return 0;
+
return (size_t) labels->version;
}
@@ -1405,6 +1426,129 @@ int rrdlabels_unittest_add_pairs() {
return errors;
}
+int rrdlabels_unittest_double_check() {
+ fprintf(stderr, "\n%s() tests\n", __FUNCTION__);
+
+ int errors = 1;
+ int ret = 0;
+ RRDLABELS *labels = rrdlabels_create();
+
+ const char *pair = "key1=value1";
+
+ struct rrdlabels_unittest_add_a_pair tmp = {
+ .pair = pair,
+ .expected_name = "key1",
+ .expected_value = NULL,
+ .errors = 0
+ };
+
+ fprintf(stderr, "rrdlabels_add_pair(labels, %s) ...\n ", pair);
+
+ rrdlabels_add_pair(labels, pair, RRDLABEL_SRC_CONFIG);
+ size_t count = rrdlabels_entries(labels);
+ fprintf(stderr, "Added one key with \"value1\", entries found %zu\n", count);
+ tmp.expected_value = "value1";
+ ret = rrdlabels_walkthrough_read(labels, rrdlabels_unittest_add_a_pair_callback, &tmp);
+
+ fprintf(stderr, "Adding key with same value \"value1\" (collision check)\n");
+ rrdlabels_add_pair(labels, pair, RRDLABEL_SRC_CONFIG);
+ count = rrdlabels_entries(labels);
+ fprintf(stderr, "Added same key again \"value1\", entries found %zu\n", count);
+
+ ret = rrdlabels_walkthrough_read(labels, rrdlabels_unittest_add_a_pair_callback, &tmp);
+
+ // Add same key with different value
+ pair = "key1=value2";
+ rrdlabels_add_pair(labels, pair, RRDLABEL_SRC_CONFIG);
+ count = rrdlabels_entries(labels);
+ fprintf(stderr, "Added same key again with \"value2\", entries found %zu\n", count);
+
+ tmp.expected_value = "value2";
+ ret = rrdlabels_walkthrough_read(labels, rrdlabels_unittest_add_a_pair_callback, &tmp);
+
+ fprintf(stderr, "Adding key with same value \"value2\" (collision check)\n");
+ rrdlabels_add_pair(labels, pair, RRDLABEL_SRC_CONFIG);
+ count = rrdlabels_entries(labels);
+ fprintf(stderr, "Added same key again with \"value2\", entries found %zu\n", count);
+
+ ret = rrdlabels_walkthrough_read(labels, rrdlabels_unittest_add_a_pair_callback, &tmp);
+ errors = tmp.errors;
+ if(ret != 1) {
+ fprintf(stderr, "failed to get \"%s\" label", "key1");
+ errors++;
+ }
+
+ if(!errors)
+ fprintf(stderr, " OK, name='%s' and value='%s'\n", tmp.name, tmp.value?tmp.value:"(null)");
+ else
+ fprintf(stderr, " FAILED\n");
+
+ rrdlabels_destroy(labels);
+
+ return errors;
+}
+
+int rrdlabels_unittest_migrate_check() {
+ fprintf(stderr, "\n%s() tests\n", __FUNCTION__);
+
+ RRDLABELS *labels1 = NULL;
+ RRDLABELS *labels2 = NULL;
+
+ labels1 = rrdlabels_create();
+ labels2 = rrdlabels_create();
+
+ rrdlabels_add(labels1, "key1", "value1", RRDLABEL_SRC_CONFIG);
+ rrdlabels_add(labels1, "key1", "value2", RRDLABEL_SRC_CONFIG);
+
+ rrdlabels_add(labels2, "new_key1", "value2", RRDLABEL_SRC_CONFIG);
+ rrdlabels_add(labels2, "new_key2", "value2", RRDLABEL_SRC_CONFIG);
+ rrdlabels_add(labels2, "key1", "value2", RRDLABEL_SRC_CONFIG);
+
+ fprintf(stderr, "Labels1 entries found %zu (should be 1)\n", rrdlabels_entries(labels1));
+ fprintf(stderr, "Labels2 entries found %zu (should be 3)\n", rrdlabels_entries(labels2));
+
+ rrdlabels_migrate_to_these(labels1, labels2);
+ fprintf(stderr, "labels1 (migrated) entries found %zu (should be 3)\n", rrdlabels_entries(labels1));
+ size_t entries = rrdlabels_entries(labels1);
+
+ rrdlabels_destroy(labels1);
+ rrdlabels_destroy(labels2);
+
+ if (entries != 3)
+ return 1;
+
+ // Copy test
+ labels1 = rrdlabels_create();
+ labels2 = rrdlabels_create();
+
+ rrdlabels_add(labels1, "key1", "value1", RRDLABEL_SRC_CONFIG);
+ rrdlabels_add(labels1, "key2", "value1", RRDLABEL_SRC_CONFIG);
+ rrdlabels_add(labels1, "key3", "value1", RRDLABEL_SRC_CONFIG);
+ rrdlabels_add(labels1, "key4", "value1", RRDLABEL_SRC_CONFIG); // 4 keys
+
+ rrdlabels_add(labels2, "key1", "value10", RRDLABEL_SRC_CONFIG);
+ rrdlabels_add(labels2, "key2", "value1", RRDLABEL_SRC_CONFIG);
+ rrdlabels_add(labels2, "key0", "value1", RRDLABEL_SRC_CONFIG);
+
+ rrdlabels_copy(labels1, labels2); // labels1 should have 5 keys
+
+ entries = rrdlabels_entries(labels1);
+ fprintf(stderr, "labels1 (copied) entries found %zu (should be 5)\n", rrdlabels_entries(labels1));
+ if (entries != 5)
+ return 1;
+
+ rrdlabels_add(labels1, "key100", "value1", RRDLABEL_SRC_CONFIG);
+ rrdlabels_copy(labels2, labels1); // labels2 should have 6 keys
+ entries = rrdlabels_entries(labels1);
+
+ fprintf(stderr, "labels2 (copied) entries found %zu (should be 6)\n", rrdlabels_entries(labels1));
+
+ rrdlabels_destroy(labels1);
+ rrdlabels_destroy(labels2);
+
+ return entries != 6;
+}
+
int rrdlabels_unittest_check_simple_pattern(RRDLABELS *labels, const char *pattern, bool expected) {
fprintf(stderr, "rrdlabels_match_simple_pattern(labels, \"%s\") ... ", pattern);
@@ -1497,6 +1641,8 @@ int rrdlabels_unittest(void) {
errors += rrdlabels_unittest_sanitization();
errors += rrdlabels_unittest_add_pairs();
errors += rrdlabels_unittest_simple_pattern();
+ errors += rrdlabels_unittest_double_check();
+ errors += rrdlabels_unittest_migrate_check();
fprintf(stderr, "%d errors found\n", errors);
return errors;
diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in
index 579e4910e..217bc6486 100755
--- a/health/notifications/alarm-notify.sh.in
+++ b/health/notifications/alarm-notify.sh.in
@@ -1786,7 +1786,7 @@ send_discord() {
"text": "${info}",
"fields": [
{
- "title": "${chart}",
+ "title": "${chart}"
}
],
"thumb_url": "${image}",
diff --git a/libnetdata/dictionary/dictionary.c b/libnetdata/dictionary/dictionary.c
index a74a59583..2d5313c39 100644
--- a/libnetdata/dictionary/dictionary.c
+++ b/libnetdata/dictionary/dictionary.c
@@ -137,6 +137,7 @@ struct dictionary {
const char *creation_function;
const char *creation_file;
size_t creation_line;
+ pid_t creation_tid;
#endif
usec_t last_gc_run_us;
@@ -1873,6 +1874,7 @@ void cleanup_destroyed_dictionaries(void) {
size_t line = dict->creation_line;
const char *file = dict->creation_file;
const char *function = dict->creation_function;
+ pid_t pid = dict->creation_tid;
#endif
DICTIONARY_STATS_DICT_DESTROY_QUEUED_MINUS1(dict);
@@ -1880,13 +1882,19 @@ void cleanup_destroyed_dictionaries(void) {
internal_error(
true,
- "DICTIONARY: freed dictionary with delayed destruction, created from %s() %zu@%s.",
- function, line, file);
+ "DICTIONARY: freed dictionary with delayed destruction, created from %s() %zu@%s pid %d.",
+ function, line, file, pid);
if(last) last->next = next;
else dictionaries_waiting_to_be_destroyed = next;
}
else {
+
+ internal_error(
+ true,
+ "DICTIONARY: cannot free dictionary with delayed destruction, created from %s() %zu@%s pid %d.",
+ function, line, file, pid);
+
DICTIONARY_STATS_DICT_DESTROY_QUEUED_PLUS1(dict);
last = dict;
}
@@ -2085,6 +2093,7 @@ DICTIONARY *dictionary_create_view(DICTIONARY *master) {
dict->creation_function = function;
dict->creation_file = file;
dict->creation_line = line;
+ dict->creation_tid = gettid();
#endif
DICTIONARY_STATS_DICT_CREATIONS_PLUS1(dict);
diff --git a/libnetdata/dictionary/dictionary.h b/libnetdata/dictionary/dictionary.h
index 72efe1d03..391be4ee5 100644
--- a/libnetdata/dictionary/dictionary.h
+++ b/libnetdata/dictionary/dictionary.h
@@ -162,6 +162,8 @@ void dictionary_version_increment(DICTIONARY *dict);
void dictionary_garbage_collect(DICTIONARY *dict);
+void cleanup_destroyed_dictionaries(void);
+
// ----------------------------------------------------------------------------
// Set an item in the dictionary
//
diff --git a/libnetdata/facets/facets.c b/libnetdata/facets/facets.c
index 52898feb3..e72cb7321 100644
--- a/libnetdata/facets/facets.c
+++ b/libnetdata/facets/facets.c
@@ -284,7 +284,8 @@ struct facets {
struct {
FACET_ROW_SEVERITY severity;
- size_t keys_matched_by_query; // the number of fields matched the full text search (per row)
+ size_t keys_matched_by_query_positive; // the number of fields matched the full text search (per row)
+ size_t keys_matched_by_query_negative; // the number of fields matched the full text search (per row)
} current_row;
struct {
@@ -1570,8 +1571,18 @@ static inline void facets_key_check_value(FACETS *facets, FACET_KEY *k) {
if(facets->query && !facet_key_value_empty(k) && ((k->options & FACET_KEY_OPTION_FTS) || facets->options & FACETS_OPTION_ALL_KEYS_FTS)) {
facets->operations.fts.searches++;
facets_key_value_copy_to_buffer(k);
- if(simple_pattern_matches(facets->query, buffer_tostring(k->current_value.b)))
- facets->current_row.keys_matched_by_query++;
+ switch(simple_pattern_matches_extract(facets->query, buffer_tostring(k->current_value.b), NULL, 0)) {
+ case SP_MATCHED_POSITIVE:
+ facets->current_row.keys_matched_by_query_positive++;
+ break;
+
+ case SP_MATCHED_NEGATIVE:
+ facets->current_row.keys_matched_by_query_negative++;
+ break;
+
+ case SP_NOT_MATCHED:
+ break;
+ }
}
if(k->values.enabled)
@@ -1831,7 +1842,8 @@ static void facets_reset_keys_with_value_and_row(FACETS *facets) {
}
facets->current_row.severity = FACET_ROW_SEVERITY_NORMAL;
- facets->current_row.keys_matched_by_query = 0;
+ facets->current_row.keys_matched_by_query_positive = 0;
+ facets->current_row.keys_matched_by_query_negative = 0;
facets->keys_in_row.used = 0;
}
@@ -1849,9 +1861,10 @@ void facets_rows_begin(FACETS *facets) {
bool facets_row_finished(FACETS *facets, usec_t usec) {
facets->operations.rows.evaluated++;
- if(unlikely((facets->query && facets->keys_filtered_by_query && !facets->current_row.keys_matched_by_query) ||
- (facets->timeframe.before_ut && usec > facets->timeframe.before_ut) ||
- (facets->timeframe.after_ut && usec < facets->timeframe.after_ut))) {
+ if(unlikely((facets->query && facets->keys_filtered_by_query &&
+ (!facets->current_row.keys_matched_by_query_positive || facets->current_row.keys_matched_by_query_negative)) ||
+ (facets->timeframe.before_ut && usec > facets->timeframe.before_ut) ||
+ (facets->timeframe.after_ut && usec < facets->timeframe.after_ut))) {
// this row is not useful
// 1. not matched by full text search, or
// 2. not in our timeframe
diff --git a/libnetdata/simple_pattern/simple_pattern.c b/libnetdata/simple_pattern/simple_pattern.c
index 70bde73a6..a0051e8f0 100644
--- a/libnetdata/simple_pattern/simple_pattern.c
+++ b/libnetdata/simple_pattern/simple_pattern.c
@@ -144,6 +144,14 @@ SIMPLE_PATTERN *simple_pattern_create(const char *list, const char *separators,
m->negative = negative;
m->case_sensitive = case_sensitive;
+ if(default_mode == SIMPLE_PATTERN_SUBSTRING) {
+ m->mode = SIMPLE_PATTERN_SUBSTRING;
+
+ struct simple_pattern *tm = m;
+ for(tm = m; tm->child ; tm = tm->child) ;
+ tm->mode = SIMPLE_PATTERN_SUBSTRING;
+ }
+
// link it at the end
if(unlikely(!root))
root = last = m;
diff --git a/packaging/go.d.checksums b/packaging/go.d.checksums
index d7679c12c..b2171eaa9 100644
--- a/packaging/go.d.checksums
+++ b/packaging/go.d.checksums
@@ -1,17 +1,17 @@
836476aed93644135120bb3d765c6e93a4364f39a7c0863b4fad4a228f1f8328 *config.tar.gz
-8aa9fc7a76871536f0e87daf4e8ccc6b7213f66ea86f55045b934623e5ef94c9 *go.d.plugin-v0.56.2.darwin-amd64.tar.gz
-bb150e858d4471320661f08a4711f8d4e38a430ffb5b6d1b03b99ba291101dbc *go.d.plugin-v0.56.2.darwin-arm64.tar.gz
-63e3b4340e110cab79d08b9ec1a2bee4d3a94dae765af1db2bd40f7d9b2af1bd *go.d.plugin-v0.56.2.freebsd-386.tar.gz
-cb96a835248c058d0ec700f105cd89ad5ccec0c436642f09878c14a523baf31f *go.d.plugin-v0.56.2.freebsd-amd64.tar.gz
-925dd01a9f78dfad0d6d74fd3414e6ea73b1905779c6f45f50368c0a3b594910 *go.d.plugin-v0.56.2.freebsd-arm.tar.gz
-248e5cb810b55b2b3f29d2a12b434268cd417bd0425b92ab6d78cacaba058ab1 *go.d.plugin-v0.56.2.freebsd-arm64.tar.gz
-8703806ad4713073792c92a7d1ebee46a9ff6dccc6b1f3a5fdb25ba748fd31d5 *go.d.plugin-v0.56.2.linux-386.tar.gz
-29d61468d793aab49f8697a9a33b06552205c881710d4cbab09eca5f399a60a7 *go.d.plugin-v0.56.2.linux-amd64.tar.gz
-52e2ea4ee029941063facff98d645c422bf6e241b3bff24536d7121560717572 *go.d.plugin-v0.56.2.linux-arm.tar.gz
-7fb62e60b8e25b4188e99fe9c178244da96e5dfeb7b62d0f276d9b5795a37476 *go.d.plugin-v0.56.2.linux-arm64.tar.gz
-ee1825ed0c5c722da7940ba6604c7836d523b61fdf10bba912fe5ce89afa7073 *go.d.plugin-v0.56.2.linux-mips.tar.gz
-b4a318423ac78aafa0047db4dcf91aca445b1fbcfd411fee6a69799695e21666 *go.d.plugin-v0.56.2.linux-mips64.tar.gz
-d83720c5b510c68e40c503785a940eff5097d54bb99d32e076c2c8df209edf5c *go.d.plugin-v0.56.2.linux-mips64le.tar.gz
-dc5d8718e0314058f8e1a2131044bfaac4b5358047c3ff0ebf720c3fc3062ae0 *go.d.plugin-v0.56.2.linux-mipsle.tar.gz
-b6d6aae1e8b3f750efd29ef4e80b22ddee184a0af35a7b51f5069902b3d6a900 *go.d.plugin-v0.56.2.linux-ppc64.tar.gz
-b1cd1ebd22f194767eeedde525a131b15155e882bd3373e8c63e110432d96443 *go.d.plugin-v0.56.2.linux-ppc64le.tar.gz
+884537604f270d5158806432784c96679467112a80074a56378ed5a43b819727 *go.d.plugin-v0.56.3.darwin-amd64.tar.gz
+eee7fa6216e5e3ff281b5203ed2381a8eedcc1c39417441701f82f8640ce3a51 *go.d.plugin-v0.56.3.darwin-arm64.tar.gz
+5e9e1c6f6c51b65899a1b11c79c97b7a17f3e898dcb2a35028d2760ac15c14eb *go.d.plugin-v0.56.3.freebsd-386.tar.gz
+369e1d74de745075570061312d31ce4ef3f2f7ce171be4fb63995d0c9c44689f *go.d.plugin-v0.56.3.freebsd-amd64.tar.gz
+5ef79cdb6941dcb30e16641ee6217d67e674a29a178d07fb44eb8ce4329906bf *go.d.plugin-v0.56.3.freebsd-arm.tar.gz
+a27f4470c9497f8f0e7f039245d98aec365186cd0081e99e44150d18088f4f62 *go.d.plugin-v0.56.3.freebsd-arm64.tar.gz
+5ba987ab34e4ff0aa0f1a1b5700944afe0345080cd3ab83fb97fe36e3c708088 *go.d.plugin-v0.56.3.linux-386.tar.gz
+ebb04e8b51a07b8d6b551e39b88343769ee4fec767d589ffa6cfa858aca6db1c *go.d.plugin-v0.56.3.linux-amd64.tar.gz
+2edcaca8db297df6a2576182dcf2320154d171c171f43f1772606cebf23655c4 *go.d.plugin-v0.56.3.linux-arm.tar.gz
+5bfd6ad65d3d7dc7f390e15ed580e58d6ca3f6026c48599566f331bf3d63e80f *go.d.plugin-v0.56.3.linux-arm64.tar.gz
+9c392c729acc126fd44ae923c187dd07376a4095bc9515f5f5e7c4763f590c9f *go.d.plugin-v0.56.3.linux-mips.tar.gz
+8270eb151d53ce83afea589ccd3a01122415c90e8df6d9024e5f2405ee209c25 *go.d.plugin-v0.56.3.linux-mips64.tar.gz
+68bca1d848116288d44272af0edc1dac47c05898eb747f62af04e18492de7d1d *go.d.plugin-v0.56.3.linux-mips64le.tar.gz
+11719aa0b01a1ed13cd9667fa83c09ddbd2c459165dedb9a7e98bbf196e47e60 *go.d.plugin-v0.56.3.linux-mipsle.tar.gz
+8cb083d7a29fb5cdec6134946275e9d960acfeb1c3244da767e2f2b3fadb1f36 *go.d.plugin-v0.56.3.linux-ppc64.tar.gz
+9bfe6539c09dafa3efbffd010ac2db0d1df15717375b89cd95ba5dfdd4c2252e *go.d.plugin-v0.56.3.linux-ppc64le.tar.gz
diff --git a/packaging/go.d.version b/packaging/go.d.version
index df8473fbd..891e4e1ae 100644
--- a/packaging/go.d.version
+++ b/packaging/go.d.version
@@ -1 +1 @@
-v0.56.2
+v0.56.3
diff --git a/packaging/version b/packaging/version
index 518f2eaf1..a336d3d35 100644
--- a/packaging/version
+++ b/packaging/version
@@ -1 +1 @@
-v1.43.0
+v1.43.1
diff --git a/streaming/sender.c b/streaming/sender.c
index c37b158b1..71f875034 100644
--- a/streaming/sender.c
+++ b/streaming/sender.c
@@ -376,7 +376,7 @@ struct {
bool dynamic;
const char *error;
int worker_job_id;
- time_t postpone_reconnect_seconds;
+ int postpone_reconnect_seconds;
bool prevent_log;
} stream_responses[] = {
{
@@ -505,7 +505,7 @@ static inline bool rrdpush_sender_validate_response(RRDHOST *host, struct sender
bool prevent_log = stream_responses[i].prevent_log;
const char *error = stream_responses[i].error;
int worker_job_id = stream_responses[i].worker_job_id;
- time_t delay = stream_responses[i].postpone_reconnect_seconds;
+ int delay = stream_responses[i].postpone_reconnect_seconds;
worker_is_busy(worker_job_id);
rrdpush_sender_thread_close_socket(host);
@@ -519,7 +519,7 @@ static inline bool rrdpush_sender_validate_response(RRDHOST *host, struct sender
internal_error(true, "STREAM %s [send to %s]: %s - will retry in %ld secs, at %s",
rrdhost_hostname(host), s->connected_to, error, delay, buf);
else
- netdata_log_error("STREAM %s [send to %s]: %s - will retry in %ld secs, at %s",
+ netdata_log_error("STREAM %s [send to %s]: %s - will retry in %d secs, at %s",
rrdhost_hostname(host), s->connected_to, error, delay, buf);
return false;
diff --git a/web/api/queries/query.c b/web/api/queries/query.c
index 8a4e94c96..b7e89ee97 100644
--- a/web/api/queries/query.c
+++ b/web/api/queries/query.c
@@ -1391,9 +1391,10 @@ static bool query_plan(QUERY_ENGINE_OPS *ops, time_t after_wanted, time_t before
// find the first time of this tier
time_t tier_first_time_s = qm->tiers[tr].db_first_time_s;
+ time_t tier_last_time_s = qm->tiers[tr].db_last_time_s;
// can it help?
- if (tier_first_time_s < selected_tier_first_time_s) {
+ if (tier_first_time_s < selected_tier_first_time_s && tier_first_time_s <= before_wanted && tier_last_time_s >= after_wanted) {
// it can help us add detail at the beginning of the query
QUERY_PLAN_ENTRY t = {
.tier = tr,
@@ -1423,12 +1424,13 @@ static bool query_plan(QUERY_ENGINE_OPS *ops, time_t after_wanted, time_t before
continue;
// find the last time of this tier
+ time_t tier_first_time_s = qm->tiers[tr].db_first_time_s;
time_t tier_last_time_s = qm->tiers[tr].db_last_time_s;
//buffer_sprintf(wb, ": EVAL BEFORE tier %d, %ld", tier, last_time_s);
// can it help?
- if (tier_last_time_s > selected_tier_last_time_s) {
+ if (tier_last_time_s > selected_tier_last_time_s && tier_first_time_s <= before_wanted && tier_last_time_s >= after_wanted) {
// it can help us add detail at the end of the query
QUERY_PLAN_ENTRY t = {
.tier = tr,