Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 23152EAE0 for ; Fri, 4 Jan 2013 08:36:19 +0000 (UTC) Received: (qmail 65018 invoked by uid 500); 4 Jan 2013 08:36:19 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 64313 invoked by uid 500); 4 Jan 2013 08:36:12 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 64268 invoked by uid 99); 4 Jan 2013 08:36:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2013 08:36:10 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [80.65.59.13] (HELO mail.enonic.com) (80.65.59.13) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2013 08:36:02 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.enonic.com (Postfix) with ESMTP id 4EEBB1D98045 for ; Fri, 4 Jan 2013 09:36:45 +0100 (CET) X-Virus-Scanned: amavisd-new at enonic.com Received: from mail.enonic.com ([127.0.0.1]) by localhost (mail.enonic.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xl1qnyw2KLRY for ; Fri, 4 Jan 2013 09:36:40 +0100 (CET) Received: from mail.enonic.com (localhost.localdomain [127.0.0.1]) by mail.enonic.com (Postfix) with ESMTP id 8BAD01D98003 for ; Fri, 4 Jan 2013 09:36:40 +0100 (CET) Date: Fri, 4 Jan 2013 09:36:40 +0100 (CET) From: Alex Rodriguez To: oak-dev@jackrabbit.apache.org Message-ID: <795295431.52808.1357288600476.JavaMail.root@zapp.enonic> In-Reply-To: <2023812516.52797.1357288529959.JavaMail.root@zapp.enonic> Subject: OAK-539: Wrong compareTo in micro-kernel Id class MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_52807_413265747.1357288600475" X-Originating-IP: [80.65.59.14] X-Mailer: Zimbra 6.0.2_GA_1912.RHEL5_64 (ZimbraWebClient - FF3.0 (Mac)/6.0.2_GA_1912.RHEL5_64) X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_52807_413265747.1357288600475 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, I have submitted an issue and also a patch with a fix. The bug and fix are quite simple, but I think the effects are quite serious. The problem is that Id.compareTo method is broken and returns the wrong ordering in some cases. I found the issue because I got randomly primary key exceptions when using H2Persistence. DefaultRevisionStore tries to retrieve the commitCounter on initialization, and for that it takes the highest of headId and lastCommitId. Due to the bug in compareTo it ends up using an id that already exists in the REVS table. After this, basically all write operations fail. And I suspect there might be other issues caused by this bug. Sorry for the long summary, maybe that belongs in the issue in jira. What I wanted to ask is what is the procedure for sending patches? It seems like the Github project is a mirror, or can I make pull requests from Github? If this is explained somewhere kindly send me to the right url. https://issues.apache.org/jira/browse/OAK-539 -- Best regards, Alex Rodriguez ------=_Part_52807_413265747.1357288600475--