[Buildbot-commits] [Buildbot] #2005: SQLAlchemy Operational errors with SQLite: Database is locked

Buildbot nobody at buildbot.net
Sun Jan 22 21:34:55 UTC 2012


#2005: SQLAlchemy Operational errors with SQLite: Database is locked
---------------------+-----------------------
Reporter:  abompard  |       Owner:
    Type:  defect    |      Status:  reopened
Priority:  critical  |   Milestone:  0.8.5
 Version:  0.8.4p1   |  Resolution:
Keywords:  database  |
---------------------+-----------------------

Comment (by dustin):

 reliably replicated with
 {{{
 #!python
     @defer.deferredGenerator
     def test_inserts(self):
         def write(conn):
             trans = conn.begin()
             conn.execute("INSERT INTO test VALUES (1, 1)")
             time.sleep(31)
             trans.commit()
         d1 = self.pool.do(write)

         def write2(conn):
             trans = conn.begin()
             conn.execute("INSERT INTO test VALUES (1, 1)")
             trans.commit()
         d2 = defer.Deferred()
         d2.addCallback(lambda _ :
             self.pool.do(write2))
         reactor.callLater(0.1, d2.callback, None)

         wfd = defer.waitForDeferred(
             defer.DeferredList([ d1, d2 ]))
         yield wfd
         wfd.getResult()
 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2005#comment:22>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list