lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Access is denied on
Date Sat, 26 Aug 2006 11:48:15 GMT
Jason Polites wrote:
> Hi all,
> When indexing with multiple threads, and under heavy load, I get the
> following exception:
> Access is denied
>    at Method)
>    at
>    at$1.obtain(
>    at
> I am using the Compass framework from Open Symphony, however this simply
> sits on top of Lucene and the folks at Open Symphony have assured me that
> the access to Lucene indexes within their framework is appropriately
> synchronized.  In either case, I would have thought Lucene should be
> managing its locks regardless of how the indexes are accessed (within the
> same JVM at least).

Are you also running searchers against this index?  Are they re-init'ing 
frequently or being opened and then held open?

This looks similar to 
(that was just opened) as well as other issues in the past, but in these 
cases there are usually also IndexReaders/Searchers against the index. 
Could you try the patch to (in that issue) and see if 
it helps?

> There is a bug report on the Sun website for this issue:

I think that bug is probably a different issue.

> Should the line "lockFile.createNewFile();" be within some form of
> synchronizion block?

Good question ... however, in your use case (the commits that 
IndexWriter is doing) the code above Lock.obtain is already 
synchronized(directory) so it's only one thread that can make it down 
into the Lock.obtain method.  So I don't believe adding synchronization 
in this method will help you.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message