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 <ilya@netdata.cloud> --------- Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Stelios Fragkakis committed
Nov 19, 2024 at 23:54 UTC
be0d5a6297f52d4e769919a0f3611ee098684e97
1 file changed
+10
src/database/sqlite/sqlite_aclk_alert.c
+10
@@ -787,6 +787,16 @@ done:
787
788
static void schedule_alert_snapshot_if_needed(struct aclk_sync_cfg_t *wc, uint64_t cloud_version)
789
{
790
+ if (cloud_version == 1) {
791
+ nd_log(
792
+ NDLS_ACCESS,
793
+ NDLP_NOTICE,
794
+ "Cloud requested to skip alert version verification for host \"%s\", node \"%s\"",
795
+ rrdhost_hostname(wc->host),
796
+ wc->node_id);
797
+ return;
798
+ }
799
+
800
uint64_t local_version = calculate_node_alert_version(wc->host);
801
if (local_version != cloud_version) {
802
nd_log(