Comment 1 for bug 2610

Revision history for this message
Stuart Bishop (stub) wrote : Re: [Bug 2610] Malone does not cope well with concurrent updates

Christian Reis wrote:
> Public bug reported:
> https://launchpad.net/malone/bugs/2610
>
> Affects: upstream malone
> Severity: Normal
> Priority: Medium
> Status: New
>
> Description:
> I just set the assignee of a bugtask at the same time as Celso was doing it. I
> got a system error:
>
> ProgrammingError: ERROR: could not serialize access due to concurrent update
> UPDATE BugTask SET assignee = 247596 WHERE id = 2715
>
> We were changing the same row and same field to the same value. I don't think
> Malone needs to detect that the changes were identical, but it can't give me a
> system error.

We need to catch this particular error (not just psycopg.ProgrammingError,
but this particular 'serialize access' one) and make Z3 raise the relevant
ConflictError that causes it to retry the transaction. (Dealing with this
case is the resposibility of the application - these exceptions are to be
expected when using the serialize transaction isolation level)

--
Stuart Bishop <email address hidden> http://www.canonical.com/
Canonical Ltd. http://www.ubuntu.com/