It appears that rollback statements are occuring in the middle of handling requests, yet the request continues to be processed. This may cause errors at commit time as SQLObject believes changes have been committed to the database that have not been. The culprit appears to be the standard Z3 editform code, which has been cargo culted into general form.
Instead of aborting the transaction mid request, we need to be able to doom the transaction.
As reference:
OOPS-53B84
OOPS-119B108
OOPS-123A293
OOPS-123B35
OOPS-125B55
OOPS-129D177
OOPS-139D917
OOPS-142A582
OOPS-147C2751
OOPS-149C143
OOPS-149C784
And:
https://lists.ubuntu.com/mailman/private/launchpad/2006-May/008784.html
https://lists.ubuntu.com/mailman/private/launchpad/2006-May/008906.html
https://lists.ubuntu.com/mailman/private/launchpad/2006-May/008938.html
We need to add some more debugging information to the OOPS reports:
- Ensure the connection doesn't change by logging id(connection_ wrapper)
- Log database commits and rollbacks