lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert engels <>
Subject Re: Lock-less commits
Date Mon, 21 Aug 2006 00:27:45 GMT
I don't think you can do this. If two different writers are opened  
for the same indexed, you always need to read the directory since the  
other may have created new segments.

On Aug 20, 2006, at 1:35 PM, Michael McCandless wrote:

> Yonik Seeley wrote:
>> On 8/20/06, Michael McCandless <> wrote:
>>> On deletable: yes, I'm currently GC'ing unused segments by doing a
>>> full directory listing.
>> Actually, you could get a full directory listing once per IndexWriter
>> and keep the results up-to-date in memory (including deletes that
>> fail).  No need for a "deletable" file, and the directory-listing hit
>> is only taken once per IndexWriter instance, not once per merge.
> Excellent!  I will take this approach.
>> IndexWriters also need to open IndexReaders (SegmentReaders) for
>> merging... I don't know if you needed to modify SegmentReader in a  
>> way
>> that reduces performance, but if so it might be possible to make a
>> special package protected factory method for use by IndexWriter that
>> regains any performance loss by making certain assumptions.
> So far, I believe my mods to SegmentReader should not affect
> performance.  It's just when instantiating the SegmentInfos (well,
> that I do a directory listing to find the latest
> "generation" segments.N file.  When IndexWriter creates the
> SegmentMerger, since it uses its own SegmentInfo's to get() each
> SegmentReader, all the necessary details (which .del.N and norms files
> are "current") are in the SegmentInfo and so SegmentReader doesn't
> need to do any extra "work".  Still this is a good suggestion to
> remember for future work.
> Thanks for all the feedback!
> Mike
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message