lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Teruhiko Kurosaka <>
Subject ConcurrentMergeScheduler, Exception and transaction
Date Sat, 21 Nov 2009 00:03:24 GMT
I was experimenting how Lucene handles 2-phase commit.
Then I noticed I am not catching all Exceptions
from Lucene.  And I think this is because Lucene's
default MergeScheduler is ConcurrentMergeScheduler,
which spawns threads to its job, and Exceptions thrown
in child threads are never reported to the parent.

Isn't this problematic when Lucene participates
in the 2-phase commit? Becuause the application
doesn't get an Exception when something bad happened
at merge time, it proceeds as normal and will
ask other parties in transaction to commit their
writes.  If I changed the MergeScheduler
to SerialMergeScheduler, my code could catch
the Exceptions.  I'd like to hear what others

By the way, do I need a new instance
of SerialMergeScheduler for each call 
to setMergeScheduler on an IndexWriter?
Or can I just share a single instance
of SerialMergeScheduler with multiple


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

View raw message