On Tue, Jul 28, 2009 at 5:10 PM, Chengdu
Huang wrote:
> For the deadlock, I also think it has something to do with merging.
Right, what's happening here is the ConcurrentMergeScheduler, which
runs BG threads to do merging, has a max thread count (default 3) that
it's allowed to run at once.
Beca
On Tue, Jul 28, 2009 at 11:32 PM, Chengdu
Huang wrote:
> Thanks Uwe!
>
> I was looking at javadoc of IndexWriter in Lucene 2.4.0 and didn't
> find anything about thread safety. The wiki page does have that
> though. Thanks.
http://wiki.apache.org/lucene-java/LuceneFAQ#head-c0e6aac25806df3a9402b39
Thanks Uwe!
I was looking at javadoc of IndexWriter in Lucene 2.4.0 and didn't
find anything about thread safety. The wiki page does have that
though. Thanks.
Chengdu
On Tue, Jul 28, 2009 at 2:20 PM, Uwe Schindler wrote:
>> By "IndexWriter is threadsafe" do you mean that I can have to two
>> t
> By "IndexWriter is threadsafe" do you mean that I can have to two
> threads, one calls IndexWriter.addDocument(), the other calls
> IndexWriter.deleteDocuments() & IndexWriter.optimize(), without any
> synchronization?
Exactly.
> For the deadlock, I also think it has something to do with mergin
Hi Simon,
By "IndexWriter is threadsafe" do you mean that I can have to two
threads, one calls IndexWriter.addDocument(), the other calls
IndexWriter.deleteDocuments() & IndexWriter.optimize(), without any
synchronization?
For the deadlock, I also think it has something to do with merging.
Below
Thanks, Mike.
Can you elaborate a bit more on why this would cause deadlock? Thanks.
Chengdu
On Tue, Jul 28, 2009 at 10:48 AM, Michael
McCandless wrote:
> This can in fact result in deadlock; you should sync on your own Object
> instead.
>
> Mike
>
> On Tue, Jul 28, 2009 at 12:27 AM, Chengdu
>
This can in fact result in deadlock; you should sync on your own Object instead.
Mike
On Tue, Jul 28, 2009 at 12:27 AM, Chengdu
Huang wrote:
> Hi,
>
> I have an application in which documents are added upon receiving a
> user request and a background thread is needed to remove old
> documents. I
I can not help you to figure out your exact problem but you can use an
the same indexwriter instance without synchronization. IndexWriter is
threadsafe so you synchronized block seems obsolet.
I could imagine that there is a backgroud merge going on while you try
to access the critical section ( yo
Hi,
I have an application in which documents are added upon receiving a
user request and a background thread is needed to remove old
documents. I have an IndexWriter opened on a Directory that adds
documents and commits but never closes. The background thread that
removes documents uses the same