[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Forcing the SQLite db to close?

From: Mark Phippard <markphip_at_gmail.com>
Date: Wed, 27 Jul 2011 15:40:21 -0400

On Wed, Jul 27, 2011 at 3:36 PM, C. Michael Pilato <cmpilato_at_collab.net>wrote:

> On 07/27/2011 03:28 PM, Mark Phippard wrote:
> > On Wed, Jul 27, 2011 at 3:22 PM, Philip Martin <
> philip.martin_at_wandisco.com
> > <mailto:philip.martin_at_wandisco.com>> wrote:
> >
> > Mark Phippard <markphip_at_gmail.com <mailto:markphip_at_gmail.com>>
> writes:
> >
> > > Noticed a problem in Eclipse. When someone wants to remove a
> project from
> > > Eclipse, the .svn folder cannot be deleted because the wc.db file
> is
> > in use.
> > > This is because, unlike the command line, when we are using JavaHL
> the
> > > process does not end until someone closes Eclipse.
> > >
> > > Is there an API we could add to JavaHL or something to tell SVN to
> > close the
> > > DB handles so that the file is not locked?
> > >
> > > Bert/Stefan, how are you dealing with this problem in your GUI
> tools? I
> > > know you have access to more API than we have for JavaH, so maybe
> there is
> > > already an API and it just needs to be exposed?
> >
> > There is a private function svn_wc__db_drop_root, I think that does
> what
> > you want. What do you want the public API to look like?
> >
> >
> > Don't know really. JavaHL uses libsvn_client. Not sure what it should
> be
> > called. Maybe disconnect or close? and takes a path within a WC as arg?
>
> Should this closure be tied to a cleanup of the pool which holds the client
> context baton?
>

We probably need some more explicit way to do it. Due to garbage collection
in Java, there could be many JavaHL objects still waiting to be closed. I
am not sure how JavaHL even handles the multiple instances of the class when
it comes to the pools and their lifetimes.

JavaHL has a dispose() method but if you call it, you currently get a
segfault when the same object is later finalized by the garbage collector.
So I am not calling it and just letting GC handle it. Again, not sure if
that would even help here.

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
Received on 2011-07-27 21:40:53 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.