Comment 8 for bug 1492919

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Hi Russell,

Thanks for the research, and the patch! I've pushed it into our gerrit code review system here: https://reviews.mahara.org/#/c/5335

What you've described makes a lot of sense. We haven't experienced this issue with the large Mahara sites we host here at Catalyst IT, and those are all on Postgres. Doing a little checking, I see that we are using the default transaction level of READ COMMITTED on our hosted site databases.

So, I think the best bet is probably to change the commit level to READ COMMITTED at the application level. I've amended your commit so that it sets that up along with the other basic database parameters when establishing the initial connection. Since this is what we're already doing on our many production Mahara sites, it's unlikely to cause problems (although race conditions are always a possibility).

In answer to your item #3, we do not have any code in place to retry when a transaction fails. We have encountered so few cases of this so far, that we've just relied on "F5" in the web browser, as the retry mechanism.

Anyway, please give the latest version of the patch a try and see if that helps: https://reviews.mahara.org/#/c/5335/

Cheers,
Aaron