Skip to content

Commit

Permalink
Improve processing on removed alerts after agent restart (netdata#18488)
Browse files Browse the repository at this point in the history
Record current unique_id not previous one

(cherry picked from commit b86d3b2)
  • Loading branch information
stelfrag committed Sep 6, 2024
1 parent b0c7c50 commit e3ade1a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/database/sqlite/sqlite_health.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,10 @@ static void sql_inject_removed_status(
int64_t health_log_id = sqlite3_column_int64(res, 0);
RRDCALC_STATUS old_status = (RRDCALC_STATUS)sqlite3_column_double(res, 1);
insert_alert_queue(
host, health_log_id, (int64_t)unique_id, (int64_t)alarm_id, old_status, RRDCALC_STATUS_REMOVED);
host, health_log_id, (int64_t)max_unique_id, (int64_t)alarm_id, old_status, RRDCALC_STATUS_REMOVED);
}
#endif
}
//else
// error_report("HEALTH [N/A]: Failed to execute SQL_INJECT_REMOVED, rc = %d", rc);

done:
REPORT_BIND_FAIL(res, param);
Expand Down

0 comments on commit e3ade1a

Please sign in to comment.