lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Teruhiko Kurosaka <K...@basistech.com>
Subject RE: ConcurrentMergeScheduler, Exception and transaction
Date Sat, 21 Nov 2009 00:49:43 GMT
Jason,
Even if there is no harm to the index,
I think the error needs to be reported back
to the caller.  I am assuming a system error 
like a filesystem error (filesystem full etc.)
that causes Lucene not be able to write new docs.
If this happens, the caller needs to be reported
of the error so that it can ask Lucene and other
participants of transaction to roll back.  Am
I missing something?

-kuro  

> -----Original Message-----
> From: Jason Rutherglen [mailto:jason.rutherglen@gmail.com] 
> Sent: Friday, November 20, 2009 4:14 PM
> To: java-user@lucene.apache.org
> Subject: Re: ConcurrentMergeScheduler, Exception and transaction
> 
> Teruhiko,
> 
> 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.
> 
> Jason
> 
> 2009/11/20 Teruhiko Kurosaka <Kuro@basistech.com>:
> > 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: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message