Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 83571 invoked from network); 14 Oct 2009 14:02:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Oct 2009 14:02:55 -0000 Received: (qmail 17096 invoked by uid 500); 14 Oct 2009 14:02:54 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 17027 invoked by uid 500); 14 Oct 2009 14:02:54 -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 17017 invoked by uid 99); 14 Oct 2009 14:02:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 14:02:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 14:02:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 54582234C045 for ; Wed, 14 Oct 2009 07:02:31 -0700 (PDT) Message-ID: <946061686.1255528951329.JavaMail.jira@brutus> Date: Wed, 14 Oct 2009 07:02:31 -0700 (PDT) From: "Michael McCandless (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-1976) isCurrent() and getVersion() on an NRT reader are broken In-Reply-To: <526587358.1255428811601.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCandless updated LUCENE-1976: --------------------------------------- Attachment: LUCENE-1976.patch Attached patch. Now, for an NRT reader, isCurrent returns false if there have been any changes in the writer since it was opened. > isCurrent() and getVersion() on an NRT reader are broken > -------------------------------------------------------- > > Key: LUCENE-1976 > URL: https://issues.apache.org/jira/browse/LUCENE-1976 > Project: Lucene - Java > Issue Type: Bug > Components: Index > Affects Versions: 2.9 > Reporter: Michael McCandless > Assignee: Michael McCandless > Priority: Minor > Fix For: 3.1 > > Attachments: LUCENE-1976.patch > > > Right now isCurrent() will always return true for an NRT reader and getVersion() will always return the version of the last commit. This is because the NRT reader holds the live segmentInfos. > I think isCurrent() should return "false" when any further changes have occurred with the writer, else true. This is actually fairly easy to determine, since the writer tracks how many docs & deletions are buffered in RAM and these counters only increase with each change. > getVersion should return the version as of when the reader was created. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org