Noorul Islam K M wrote on Mon, Nov 01, 2010 at 21:42:02 +0530: > Philip Martin <philip.mar...@wandisco.com> writes: > > > Noorul Islam K M <noo...@collab.net> writes: > > > >> Test cases are written using python unittest framework and it has two > >> methods, setUp() and tearDown() which gets executed for every case. In > >> tearDown(), repository which is created in setUp() is deleted using > >> svn_repos_delete(). During first iteration there are no issues but in > >> the second iteration (test case), the system throws the above mentioned > >> error. Using lsof command I could see something like this > >> > >> python 18111 noorul 4u REG 8,1 5120 279333 > >> /tmp/svn_test_repos/db/revp > >> rops/revprops.db (deleted) > >> > >> Does this mean that the sqlite file pointers are not completely > >> destroyed? > > > > Yes. The repository handle from the previous svn_repos_create function > > is still around when svn_repos_delete is called. > > > > This is a new problem caused by the revprop packing. Also, there > > doesn't appear to be an API for explicitly closing the repository > > handle. Solutions include: > > > > - adding an svn_repos_close API > > - clearing or destroying the pool passed to svn_repos_create > > - having the test create repositories at different locations > > I have implemented the last solution and attached is the patch for the > same.
I think Philip was just enumerating all possible solutions. I think making the test suite avoid the problem is the wrong solution --- it would be better to cause those dangling handles to get closed at the appropriate time (e.g., when there are no more references to the Python repos object).