You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by jian chen <ch...@gmail.com> on 2005/11/08 01:17:05 UTC

lucene inter-process locking question

Hi, Lucene Developers,
 Just got a question regarding the locking mechanism in Lucene. I see in
IndexReader, first there is synchronized(directory) to synch up
multi-threads, then, inside, there is the statement for grabbing the
commit.lock.
 So, my question is, could the multi-thread synch be also done with
commit.lock? In other words, I don't understand why synchronized(directory)
is there meanwhile commit.lock could do both in and inter-process locking?
 Could anyone enlighten me about it?
 Thanks so much in advance,
 Jian

Fwd: lucene inter-process locking question

Posted by jian chen <ch...@gmail.com>.
Hi,
 I did some research and found an answer from the following url:

http://www.gossamer-threads.com/lists/lucene/java-dev/21808?search_string=synchronized%20directory;#21808
 So, now I understand that it is partly historical.
 Cheers,
 Jian

---------- Forwarded message ----------
From: jian chen <ch...@gmail.com>
Date: Nov 7, 2005 4:17 PM
Subject: lucene inter-process locking question
To: java-dev@lucene.apache.org

 Hi, Lucene Developers,
 Just got a question regarding the locking mechanism in Lucene. I see in
IndexReader, first there is synchronized(directory) to synch up
multi-threads, then, inside, there is the statement for grabbing the
commit.lock .
 So, my question is, could the multi-thread synch be also done with
commit.lock? In other words, I don't understand why synchronized(directory)
is there meanwhile commit.lock could do both in and inter-process locking?
 Could anyone enlighten me about it?
 Thanks so much in advance,
 Jian