Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 75667 invoked from network); 21 Aug 2006 00:28:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Aug 2006 00:28:11 -0000 Received: (qmail 4527 invoked by uid 500); 21 Aug 2006 00:28:09 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 4497 invoked by uid 500); 21 Aug 2006 00:28:09 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 4486 invoked by uid 99); 21 Aug 2006 00:28:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Aug 2006 17:28:09 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [209.86.89.65] (HELO elasmtp-kukur.atl.sa.earthlink.net) (209.86.89.65) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Aug 2006 17:28:08 -0700 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=ix.netcom.com; b=Bncnn4TyvQ5OgllhlYHvxGsRbHj8BphMJRKF2vmepC0G+4l9kICqfr8ucGyltzDE; h=Received:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [66.245.135.50] (helo=[192.168.1.119]) by elasmtp-kukur.atl.sa.earthlink.net with asmtp (TLSv1:RC4-SHA:128) (Exim 4.34) id 1GExdr-0007my-CT for java-dev@lucene.apache.org; Sun, 20 Aug 2006 20:27:47 -0400 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <44E8AB73.7000100@mikemccandless.com> References: <44E5B16D.4010805@mikemccandless.com> <44E5E364.9010907@mikemccandless.com> <44E609E7.9020406@mikemccandless.com> <44E87EC1.5020707@mikemccandless.com> <44E8AB73.7000100@mikemccandless.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: robert engels Subject: Re: Lock-less commits Date: Sun, 20 Aug 2006 19:27:45 -0500 To: java-dev@lucene.apache.org X-Mailer: Apple Mail (2.752.2) X-ELNK-Trace: 33cbdd8ed9881ca8776432462e451d7bd15d05d9470ff710456f09cc76c0897c011d9f522b915f0d350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 66.245.135.50 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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, > SegmentInfos.read()) 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: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org