From be0d5a6297f52d4e769919a0f3611ee098684e97 Mon Sep 17 00:00:00 2001 From: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> Date: Tue, 19 Nov 2024 23:54:55 +0200 Subject: [PATCH] Add a special version number to bypass alert snapshots (#19042) * Special alert version 1, bypasses version check * Update src/database/sqlite/sqlite_aclk_alert.c Co-authored-by: Ilya Mashchenko --------- Co-authored-by: Ilya Mashchenko --- src/database/sqlite/sqlite_aclk_alert.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/database/sqlite/sqlite_aclk_alert.c b/src/database/sqlite/sqlite_aclk_alert.c index 803f6396c1013d..4aa640484ca27e 100644 --- a/src/database/sqlite/sqlite_aclk_alert.c +++ b/src/database/sqlite/sqlite_aclk_alert.c @@ -787,6 +787,16 @@ static uint64_t calculate_node_alert_version(RRDHOST *host) static void schedule_alert_snapshot_if_needed(struct aclk_sync_cfg_t *wc, uint64_t cloud_version) { + if (cloud_version == 1) { + nd_log( + NDLS_ACCESS, + NDLP_NOTICE, + "Cloud requested to skip alert version verification for host \"%s\", node \"%s\"", + rrdhost_hostname(wc->host), + wc->node_id); + return; + } + uint64_t local_version = calculate_node_alert_version(wc->host); if (local_version != cloud_version) { nd_log(