I don't see any other exceptions. I just did a run with debug logging enabled and I get (remember that I'm looping across thousands of Users, updating UserDetails for each):
1. hundreds of lines like this, with an optimize every 100 updates as expected, it ran for over a minute like this:
Code:
[2010-04-20 10:21:59.286,211153]DEBUG[Hibernate Search: Directory writer-1](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
[2010-04-20 10:21:59.468,211335]DEBUG[Hibernate Search: Directory writer-1](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
[2010-04-20 10:21:59.578,211445]DEBUG[Hibernate Search: Directory writer-1](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
2. then I start seeing some updates on 'backend queueing processor' threads:
Code:
[2010-04-20 10:21:59.833,211700]DEBUG[Hibernate Search: backend queueing processor-2](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
[2010-04-20 10:21:59.860,211727]DEBUG[Hibernate Search: Directory writer-1](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
[2010-04-20 10:21:59.933,211800]DEBUG[Hibernate Search: backend queueing processor-1](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
[2010-04-20 10:22:00.020,211887]DEBUG[Hibernate Search: backend queueing processor-2](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
[2010-04-20 10:22:00.225,212092]DEBUG[Hibernate Search: backend queueing processor-2](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
[2010-04-20 10:22:00.373,212240]DEBUG[Hibernate Search: Directory writer-1](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
[2010-04-20 10:22:00.594,212461]DEBUG[Hibernate Search: Directory writer-1](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
[2010-04-20 10:22:00.594,212461]DEBUG[Hibernate Search: backend queueing processor-1](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
[2010-04-20 10:22:00.933,212800]DEBUG[Hibernate Search: backend queueing processor-2](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
[2010-04-20 10:22:01.112,212979]DEBUG[Hibernate Search: backend queueing processor-2](PerDPQueueProcessor.java:99) - Opening an IndexWriter for update
3. three seconds after it started with those backend queueing processor threads:
Code:
[2010-04-20 10:22:03.588,215455]ERROR[Hibernate Search: backend queueing processor-1](PerDPQueueProcessor.java:118) - Unexpected error in Lucene Backend:
org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
at org.apache.lucene.index.DocumentsWriter.waitReady(DocumentsWriter.java:868)
at org.apache.lucene.index.DocumentsWriter.getThreadState(DocumentsWriter.java:705)
at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:771)
at org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:759)
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:2477)
at org.hibernate.search.backend.impl.lucene.works.AddWorkDelegate.performWork(AddWorkDelegate.java:77)
at org.hibernate.search.backend.impl.lucene.PerDPQueueProcessor.run(PerDPQueueProcessor.java:106)
at java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:1746)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)
at org.hibernate.search.backend.impl.lucene.QueueProcessors.runAllAsync(QueueProcessors.java:85)
at org.hibernate.search.backend.impl.lucene.QueueProcessors.runAll(QueueProcessors.java:73)
at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueProcessor.run(LuceneBackendQueueProcessor.java:81)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
[2010-04-20 10:22:03.592,215459]ERROR[Hibernate Search: backend queueing processor-1](LogErrorHandler.java:83) - Exception occurred org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
Primary Failure:
Entity com.attensa.core.entity.User Id 1299 Work Type org.hibernate.search.backend.AddLuceneWork
org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
at org.apache.lucene.index.DocumentsWriter.waitReady(DocumentsWriter.java:868)
at org.apache.lucene.index.DocumentsWriter.getThreadState(DocumentsWriter.java:705)