jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: OAK-539: Wrong compareTo in micro-kernel Id class
Date Fri, 04 Jan 2013 09:42:03 GMT
hi alex,

On Fri, Jan 4, 2013 at 9:36 AM, Alex Rodriguez <aro@enonic.com> wrote:
> 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

good catch! and thanks for providing a patch :)

i've applied your patch and resolved the issue.

the github project is just a mirror, as you've already guessed.

the jackrabbit-oak projects sources are stored in the
svn repository at http://svn.apache.org/repos/asf/jackrabbit/.

'svn diff' is the preferred patch format.

cheers
stefan

>
> --
> Best regards,
>
> Alex Rodriguez
>
>

Mime
View raw message