On Fri, 23 Nov 2012 02:10:36 +0100 Matej Gregr igregr@fit.vutbr.cz wrote:
Hello,
Hello Matej!
I have noticed, that NAV is reporting jobs as overdue, even though a job end with success. I believe the problem is caused by trigger trim_old_ipdevpoll_job_log_entries, which should delete the old jobs from the ipdevpoll_job_log table.
DELETE FROM ipdevpoll_job_log WHERE id IN (SELECT id FROM ipdevpoll_job_log WHERE job_name=NEW.job_name AND netboxid=NEW.netboxid ORDER BY end_time ASC OFFSET 100);
When there are 100 log entries for a job in the nav database the trigger will delete the newest logged job instead of oldest one. I believe, that the ORDER BY clause should be DESC not ASC.
Thanks for taking the time to give such a detailed report! However, this is a known bug [1], and it was fixed in NAV 3.12.1. It's time to upgrade :-)
[1] https://bugs.launchpad.net/nav/+bug/1053866