Forum OpenACS Q&A: Re: Assessment - urgent

Collapse
44: Re: Assessment - urgent (response to 1)
Posted by Dave Bauer on
Why is assessment doing a lock before creating 20 items? Seems like a design problem. Even if you didn't use the CR you'd still have to insert all the data, so it doesn't seem the CR is inherently causing the issue.

If it is, I'd be very interetsed to know what about the CR causes this.

Roel is going to research more on our installation as well. I look forward to more information on what is causing this behavior.

I think if we can isolate the code, we can come up with a design that will work.

Collapse
Posted by Peter Alberer on
Have a look at this thread here: http://archives.postgresql.org/pgsql-general/2004-09/msg00442.php
The problem seems to come from a combination of a postgres "problem" with the intensive use of revisions in the assessment package.
Collapse
Posted by Peter Alberer on
Assessment is not doing an explicit lock anywhere, it is the foreign keys on the cr_items/cr_revisions table that are causing problems. When inserting a new submission, there is a new revision in cr_revisions, which causes the corresponding entry in the cr_items table to be locked.

Despite the fact that i know how a deadlock can appear in general, i am not sure why it happens that often in the assessments package. When 2 users are submitting the same assessment in the same moment, where the questions are in the same order, why would there be a deadlock?