You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Hohwiller, Joerg" <j....@t-online.net> on 2003/12/16 11:37:12 UTC
Lock obtain timed out
Hi there,
I have not yet got any response about my problem.
While debugging into the depth of lucene (really hard to read deep insde) I
discovered that it is possible to disable the Locks using a System property.
When I start my application with -DdisableLuceneLocks=true,
I do not get the error anymore.
I just wonder if this is legal and wont cause other trouble???
As far as I could understand the source, a proper thread
synchronization is done using locks on Java Objects and
the index-store locks seem to be required only if multiple
lucenes (in different VMs) work on the same index.
In my situation there is only one Java-VM running and only one
lucene is working on one index.
Am I safe disabling the locking???
Can anybody tell me where to get documentation about the Locking
strategy (I still would like to know why I have that problem) ???
Or does anybody know where to get an official example of how to
handle concurrent index modification and searches?
Tank you so much
Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Lock obtain timed out
Posted by Tatu Saloranta <ta...@hypermall.net>.
On Tuesday 16 December 2003 03:37, Hohwiller, Joerg wrote:
> Hi there,
>
> I have not yet got any response about my problem.
>
> While debugging into the depth of lucene (really hard to read deep insde) I
> discovered that it is possible to disable the Locks using a System
> property.
...
> Am I safe disabling the locking???
> Can anybody tell me where to get documentation about the Locking
> strategy (I still would like to know why I have that problem) ???
>
> Or does anybody know where to get an official example of how to
> handle concurrent index modification and searches?
One problem I have seen, and am still trying to solve, is that if my web app
is terminated (running from console during development, ctrl+c on unix),
sometimes it seems "commit.lock" file is left. Now problem is that apparently
method that seems like it tries to check if there is a lock (and subsequently
asking it to be removed via API) doesn't consider that to be "the" lock
(sorry for not having details, writing this from home without source). So
I'll probably see if disabling locks would get rid of this lock file (as I
never have multiple writers, or even writer and reader, working on same
index... I just always make full file copy of index before doing incremental
updates), or physically delete commit.lock if necessary when starting the
app.
The problem I describe above happens fairly infrequently, but that's actually
what makes it worse... our QA people (in different continent) have been
bitten by a bit couple of times. :-/
-+ Tatu +-
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Lock obtain timed out
Posted by Morus Walter <mo...@tanto-xipolis.de>.
Hohwiller, Joerg writes:
>
> Am I safe disabling the locking???
No.
> Can anybody tell me where to get documentation about the Locking
> strategy (I still would like to know why I have that problem) ???
>
I guess -- but given your input I really have to guess; the source you
wanted to attach didn't make it to the list -- your problem is, that
you cannot have a writing (deleting) IndexReader and an IndexWriter open
at the same time.
There can only be one instance that writes to an index at one time.
Disabling locking disables the checks, but then you have to take care
yourself. So in practice disabling locking is useful for readonly access
to static indices only.
Morus
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org