lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Rutherglen <>
Subject Re: ConcurrentMergeScheduler, Exception and transaction
Date Sat, 21 Nov 2009 00:13:41 GMT

The index remains consistent even when a background merge fails,
meaning commit truly represents a valid index after it's called.
You can share merge schedulers, though in practice it's not
going to improve anything.


2009/11/20 Teruhiko Kurosaka <>:
> 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
> think.
> 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
> IndexWriters?
> -kuro
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message