lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: FSDirectory.setDisableLocks
Date Sat, 15 Aug 2009 09:49:25 GMT
You could also use NoLockFactory.

Disabling locks just means Lucene stops checking if another writer has
the index open (the write.lock file).

It's extremely dangerous to do, unless you are absolutely certain your
application level locking properly implements the protection.  It will
quickly lead to index corruption.

I would expect no real performance change, unless you create writers
exceptionally often.

A read-only index need not disable locks because IndexReader will
never attempt to create a lock.  (Before 2.1 there was also a commit
lock, which IndexReader did create, but as of 2.1 IndexReader is
readOnly, unless you use it to do deletions or change norms).


On Sat, Aug 15, 2009 at 2:15 AM, Shai Erera<> wrote:
> Hi
> If I can guarantee only one JVM will update an index (not at a time - truly
> just one JVM), can I disable locks, or is it really necessary only for
> read-only devices? If I disable locks, will I see any performance
> improvements?
> Thanks
> Shai

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

View raw message