Re: Exception while Optimizing the index database



On Fri, 2004-12-03 at 12:47 -0600, Jon Trowbridge wrote:
> > On Fri, 2004-12-03 at 08:36 -0600, Jon Trowbridge wrote:
> > > We are running out of file descriptors.  I just committed a small change
> > > to the LuceneDriver that might help with this.
>
> No, 47.  It is totally arbitrary.
>
> In case anyone is curious, we are talking about 
> public bool NeedsOptimize {
> 	get { 
> 		// FIXME: 47 is a totally arbitrary number.
> 		return adds_since_last_optimization
> 			+ removals_since_last_optimization > 47;
> 	}
> }
> from LuceneDriver.cs.

Even with the 47 value I still hit the bug earlier, and I think I've
tracked to down to the fact that Optimize() was never being called.  I
added a check to see if it's necessary after calling Flush() in
DoTaskReal(), which mirrors how it works in the LuceneTaskCollector.  To
prevent us from optimizing too often (47 is low since after a single
pass through an IIndexableGenerator will get us ~60) I bumped it up to a
slightly-less-but-still-arbitrary 259.  I've been indexing my mail with
a live query going for about 30 minutes without running out of file
descriptors.  Here's hoping it's finally dead.

Joe




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]