Ok. Glad to contribute :) 
Thanks for the quick handling. 

Cheers 
Alex 

----- Original Message ----- 
From: "Stefan Guggisberg" <[email protected]> 
To: [email protected] 
Sent: Friday, January 4, 2013 10:42:03 AM 
Subject: Re: OAK-539: Wrong compareTo in micro-kernel Id class 

hi alex, 

On Fri, Jan 4, 2013 at 9:36 AM, Alex Rodriguez <[email protected]> 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 
> 
> 

Reply via email to