Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BDDFC9E6D for ; Tue, 7 Feb 2012 20:45:24 +0000 (UTC) Received: (qmail 49902 invoked by uid 500); 7 Feb 2012 20:45:23 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 49826 invoked by uid 500); 7 Feb 2012 20:45:22 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 49685 invoked by uid 99); 7 Feb 2012 20:45:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 20:45:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 20:45:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4599E1A8C7B for ; Tue, 7 Feb 2012 20:44:59 +0000 (UTC) Date: Tue, 7 Feb 2012 20:44:59 +0000 (UTC) From: "Michael McCandless (Resolved) (JIRA)" To: dev@lucene.apache.org Message-ID: <1678540048.10246.1328647499286.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <174138470.2136.1325628519209.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (LUCENE-3672) IndexCommit.equals() bug 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-3672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCandless resolved LUCENE-3672. ---------------------------------------- Resolution: Fixed Fix Version/s: 4.0 3.6 > IndexCommit.equals() bug > ------------------------ > > Key: LUCENE-3672 > URL: https://issues.apache.org/jira/browse/LUCENE-3672 > Project: Lucene - Java > Issue Type: Bug > Components: core/index > Affects Versions: 4.0 > Reporter: Andrzej Bialecki > Assignee: Michael McCandless > Fix For: 3.6, 4.0 > > Attachments: LUCENE-3672.patch > > > IndexCommit.equals() checks for equality of Directories and versions, but it doesn't check IMHO the more important generation numbers. It looks like commits are really identified by a combination of directory and segments_XXX, which means the generation number, because that's what the DirectoryReader.open() checks for. > This bug leads to an unexpected behavior when the only change to be committed is in userData - we get two commits then that are declared equal, they have the same version but they have different generation numbers. I have no idea how this situation is treated in a few dozen references to IndexCommit.equals() across Lucene... > On the surface the fix is trivial - either add the gen number to equals(), or use gen number instead of version. However, it's puzzling why these two would ever get out of sync??? and if they are always supposed to be in sync then maybe we don't need both of them at all, maybe just generation or version is sufficient? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org