0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-25 21:43:55 +00:00

Dont send a snapshot with snapshot id 0 ()

This commit is contained in:
Emmanuel Vasilakis 2022-03-24 10:29:10 +02:00 committed by GitHub
parent fe93dcce9f
commit 4b13dba445
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -661,6 +661,8 @@ void aclk_process_send_alarm_snapshot(char *node_id, char *claim_id, uint64_t sn
wc->host ? wc->host->hostname : "N/A",
snapshot_id,
sequence_id);
if (wc->alerts_snapshot_id == snapshot_id)
return;
__sync_synchronize();
wc->alerts_snapshot_id = snapshot_id;
wc->alerts_ack_sequence_id = sequence_id;
@ -783,6 +785,9 @@ void aclk_push_alert_snapshot_event(struct aclk_database_worker_config *wc, stru
return;
}
if (unlikely(!wc->alerts_snapshot_id))
return;
char *claim_id = is_agent_claimed();
if (unlikely(!claim_id))
return;