incubator-jena-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Seaborne <>
Subject Re: .sync() but not .close()... why?
Date Thu, 27 Oct 2011 16:28:41 GMT
On 27/10/11 10:33, Paolo Castagna wrote:
> Hi,
> I have been using a lot recently always without
> problems.
> CmdIndexBuild uses BPlusTreeRewriter to build a BPlusTree.
> By the way, great peace of code, very useful and fast: thanks Andy!.
> CmdIndexBuild calls .sync() on the BPlusTree object, but not .close().
> Should we call .close() just to be sure or .sync() it's fine?
> (I am trying to nail down a sort of "intermittent" problem and I spotted
> this while I was investigating possible causes).
> I do not think this is a problem, but double checking and/or calling
> .close()
> is not a bad idea.

And does it change your intermittent problem or not?

> Cheers,
> Paolo
> [1]

.sync does the important part (i.e. cache to disk if any).  Close is 
only going to sort out intern

And the program exits immediately afterwards so file handles are closed 

(and the .sync prob isn't necessary because the block mgrs got sync'ed 


View raw message