[Buildbot-devel] sqlalchemy putting several operations into transactions
Dustin J. Mitchell
dustin at v.igoro.us
Fri Nov 22 15:41:40 UTC 2013
Correct - Buildbot never disables autocommit. So I think you may have
discovered a pretty substantial flaw in the Buildbot DB connector.
Rather than disable autocommit for the cases where we want to do
rollbacks, I wonder if we could handle this in the DB pool. Before
calling a DB method in its thread, disable autocommit on the
connector. Then, when the method returns successfully, call
conn.commit(). In a way, this means Buildbot is doing its own version
of autocommit -- but after each method, rather than after each query.
Does that make sense? Do you want to work up a patch to Buildbot
itself to fix this?
More information about the devel