Bug report from Stephane Glondu:
We've noticed that putting a [todo:nn TODO item] with a number which does't exist makes nurpawiki crash (hopefully, ocsigen itself is still fine). I've not yet investigated on how to fix the bug, I didn't even try the svn version (I am using version 1.2.0, plus the patch I've sent you for ocsigen 1.0.0RC1).
Comment #1
Posted on Mar 22, 2008 by Happy LionFixed in r413.
The server became unresponsive as one of the SQL queries failed a foreign key constraint and started to fail subsequent transactions.
2008-03-21 18:31:58 EET ERROR: insert or update on table "todos_in_pages" violates foreign key constraint "$1" 2008-03-21 18:31:58 EET DETAIL: Key (todo_id)=(2) is not present in table "todos". 2008-03-21 18:31:58 EET STATEMENT: BEGIN; DELETE FROM nw.todos_in_pages WHERE page_id = 1;INSERT INTO nw.todos_in_pages(todo_id,page_id) values(2, 1);INSERT INTO nw.todos_in_pages(todo_id,page_id) values(1, 1);COMMIT
The fix was to not insert/delete inexistent todos into/from this relation.
Comment #2
Posted on Mar 22, 2008 by Happy LionNote: the server shouldn't go into a unresponsive mode even if something like this happens. Perhaps this should be remedied by doing a ROLLBACK if any of the commands inside the txn failed.
Status: Fixed
Labels:
Type-Defect
Priority-High
Milestone-Release1.2
Security