@cryptotaxi247 / netdata-1 / commits / b86d3b2ed

Improve processing on removed alerts after agent restart (#18488)

Record current unique_id not previous one

Stelios Fragkakis committed Sep 5, 2024 at 19:48 UTC b86d3b2ed9ade20eba0d46836dbf19b294e435ea
1 file changed +1 -3
src/database/sqlite/sqlite_health.c
+1 -3
@@ -430,10 +430,8 @@ static void sql_inject_removed_status(
430 int64_t health_log_id = sqlite3_column_int64(res, 0);
431 RRDCALC_STATUS old_status = (RRDCALC_STATUS)sqlite3_column_double(res, 1);
432 insert_alert_queue(
433 - host, health_log_id, (int64_t)unique_id, (int64_t)alarm_id, old_status, RRDCALC_STATUS_REMOVED);
433 + host, health_log_id, (int64_t)max_unique_id, (int64_t)alarm_id, old_status, RRDCALC_STATUS_REMOVED);
434 }
435 - //else
436 - // error_report("HEALTH [N/A]: Failed to execute SQL_INJECT_REMOVED, rc = %d", rc);
435
436 done:
437 REPORT_BIND_FAIL(res, param);