[Nitro] re-using a db and threading headaches

Alex Pooley alex at msgpad.com
Sat Aug 26 03:21:25 EDT 2006


I've been working around two issues. One I have a solution for, and the
other issue I have a test case courtesy of manveru.

1. When I try to re-use an existing database Og dies on an exception
that the table already exists. I'm using sqlite. The easy fix is to
catch the exception in sql.rb at line 139. So instead of


You end up with something more like

rescue Exception

2. I'm running two threads. The first thread is running tests, and the
second thread is a mongrel server. Each thread is accessing the Og
store. Og will die trying to close the store in manager.rb (line 101),
because @store is nil. manveru came up with this test case while
discussing the problem on IRC: http://pastie.caboo.se/10334 . This
occurs in both the repo.nitroproject.org repository, and manveru's

Alex Pooley (msgpad founder)
w: http://msgpad.com
e: alex at msgpad.com
b: http://alexpooley.com

More information about the Nitro-general mailing list