mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #02249
[Bug 685642] Re: Locked crons cause duplicate key errors in postgres logs
Hi Richard,
That makes sense. I've added the SQLException try/catch as you suggest
so we now have the best of both worlds. I've re-factored the code
slightly to reduce code duplication.
I also noticed that DB_IGNORE_SQL_EXCEPTIONS was only unset if there was
an exception so I've fixed that too.
** Changed in: mahara
Status: New => Fix Committed
** Changed in: mahara
Assignee: (unassigned) => Andrew Nicols (dobedobedoh)
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/685642
Title:
Locked crons cause duplicate key errors in postgres logs
Status in Mahara ePortfolio:
Fix Committed
Bug description:
This affects postgres, and may affect MySQL too. Although this is currently the intended behaviour of lib/cron.php->cron_lock(), and the SQLException is caught in the php, the error is still seen by the database and logged in the database server's logs.
Although it's not actually an issue, it may confuse/upset admins and is probably best removed.
The easiest solution is to run a get_field before the insert atempt, but obviously this adds an additional database call to the mix. I imagine that this is the reason that the current system was implemented in this manner, so I won't push my fix just yet.
Any thoughts..?
References