diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2020-06-29 22:12:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-29 22:12:08 +0300 |
commit | adc37259c2b158232e8faf0c9806df1546558044 (patch) | |
tree | 984f3b35c58b1e7fb3c892dde9772711fbf347b6 /database/rrdcalc.c | |
parent | 5d21a9d5427a35a251d64ed372d3d5e16e016474 (diff) |
Fixed duplicate alarm ids in health-log.db (#9428)
Fixed duplicate alarm ids in health-log.db
Diffstat (limited to 'database/rrdcalc.c')
-rw-r--r-- | database/rrdcalc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/database/rrdcalc.c b/database/rrdcalc.c index 23303a81bd..1d7b15dd0d 100644 --- a/database/rrdcalc.c +++ b/database/rrdcalc.c @@ -252,6 +252,9 @@ inline uint32_t rrdcalc_get_unique_id(RRDHOST *host, const char *chart, const ch } } + if (unlikely(!host->health_log.next_alarm_id)) + host->health_log.next_alarm_id = (uint32_t)now_realtime_sec(); + return host->health_log.next_alarm_id++; } |