Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 35055 invoked from network); 8 Nov 2009 16:18:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Nov 2009 16:18:33 -0000 Received: (qmail 74689 invoked by uid 500); 8 Nov 2009 16:18:32 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 74613 invoked by uid 500); 8 Nov 2009 16:18:32 -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 74605 invoked by uid 99); 8 Nov 2009 16:18:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Nov 2009 16:18:32 +0000 X-ASF-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of simon.willnauer@googlemail.com designates 209.85.218.222 as permitted sender) Received: from [209.85.218.222] (HELO mail-bw0-f222.google.com) (209.85.218.222) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Nov 2009 16:18:30 +0000 Received: by bwz22 with SMTP id 22so3002444bwz.5 for ; Sun, 08 Nov 2009 08:18:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=T9Pq6hCkjkTu7u4IxrYov6HBNi/3o+jo2mrPIO17724=; b=DuPuPFaCX8d4AHp7SRdDhEkcd59avAH3hT1c8Jn+FGqcCpTaQQ7//qP4xvOKMQgoHN cSpeJ8gZ2n//4I895RQZgtezcYNmG6BSHpZRFO+DMjYi/5JFszHgpNuuRP5Mol6jMw9r r7hBDB7f67kyhoTTwgCdjTfdlGR4AxQCerxxo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; b=h0RkbroHY0IxJZu51U2F8/i4HDgLmYryG3NkcjtlajPhraiwWSPXmDmxfpXj+DmxzJ MusC2SveYhHSCQjwkVmHvVMwU2UVE2cXXBzJ0yVx6XsX/MYwZu0eXcLXllskiBa39714 pWcsaJ51fKgpzQUmHzrBBoi0SxnVNdslEtrPA= MIME-Version: 1.0 Received: by 10.239.168.157 with SMTP id k29mr792912hbe.67.1257697088501; Sun, 08 Nov 2009 08:18:08 -0800 (PST) Reply-To: simon.willnauer@gmail.com In-Reply-To: <9ac0c6aa0911080714i4a31366an59e965aeeeea5fb2@mail.gmail.com> References: <786fde50911080558q678f9df2ufda96e8927c6c38f@mail.gmail.com> <9ac0c6aa0911080714i4a31366an59e965aeeeea5fb2@mail.gmail.com> Date: Sun, 8 Nov 2009 17:18:08 +0100 Message-ID: Subject: Re: A report for "Not so important (but still is a) bug" From: Simon Willnauer To: java-dev@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable dude, will we have 2.9.2? :) simon On Sun, Nov 8, 2009 at 4:14 PM, Michael McCandless wrote: > We should fix this; I'll open an issue & dig. > > Somehow SegmentInfo.files() is being buggy, claiming _0.prx is a file > belonging to the segment, when it clearly isn't. > > BTW we can't hold 2.9.1, since it's now "out" (as of yesterday) :) > > Mike > > On Sun, Nov 8, 2009 at 8:58 AM, Shai Erera wrote: >> Hi >> >> I wanted to check something and wrote this very simple program, which >> surprisingly failed because of a FileNotFound exception: >> >> =C2=A0=C2=A0=C2=A0 =C2=A0 Directory dir =3D new RAMDirectory(); >> =C2=A0=C2=A0=C2=A0 =C2=A0 IndexWriter writer =3D new IndexWriter(dir, ne= w SimpleAnalyzer(), >> MaxFieldLength.UNLIMITED); >> =C2=A0=C2=A0=C2=A0 =C2=A0 writer.setInfoStream(System.out); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 writer.addDocument(new Document()); >> =C2=A0=C2=A0=C2=A0 =C2=A0 writer.commit(); >> =C2=A0=C2=A0=C2=A0 =C2=A0 writer.close(); >> >> It fails with the exception: >> >> Exception in thread "main" java.io.FileNotFoundException: _0.prx >> =C2=A0=C2=A0=C2=A0 at >> org.apache.lucene.store.RAMDirectory.fileLength(RAMDirectory.java:149) >> =C2=A0=C2=A0=C2=A0 at >> org.apache.lucene.index.DocumentsWriter.segmentSize(DocumentsWriter.java= :1150) >> =C2=A0=C2=A0=C2=A0 at >> org.apache.lucene.index.DocumentsWriter.flush(DocumentsWriter.java:587) >> =C2=A0=C2=A0=C2=A0 at >> org.apache.lucene.index.IndexWriter.doFlushInternal(IndexWriter.java:357= 2) >> =C2=A0=C2=A0=C2=A0 at org.apache.lucene.index.IndexWriter.doFlush(IndexW= riter.java:3483) >> =C2=A0=C2=A0=C2=A0 at org.apache.lucene.index.IndexWriter.flush(IndexWri= ter.java:3474) >> =C2=A0=C2=A0=C2=A0 at >> org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1940) >> =C2=A0=C2=A0=C2=A0 at >> org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1894) >> >> This happens on the latest code from trunk (and validated also against 2= .4). >> Seems like it's there forever. This only happens when I set infoStream, >> because as part of the logging we compute the segment size. _0.prx is no= t >> found because I didn't add any terms to the index. If I don't set the >> infoStream, or add terms to the index, this exception is not thrown. >> >> Like I wrote in the subject, I don't think it's that important (for exam= ple >> to hold off 2.9.1), but still a bug. Not a very important bug even, but = I >> can't get it out of my head that it's still a bug :) >> >> Can be fixed by making sure segmentSize() does not thrown any FNF except= ion >> for missing .prx? Does not sound too safe to me. Maybe we just remember = this >> and tell people (like me) "even in silly tests, add a term to the docume= nt"? >> >> Shai. >> > > --------------------------------------------------------------------- > 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