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 (#12469)
This commit is contained in:
parent
fe93dcce9f
commit
4b13dba445
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue