[ 
https://issues.apache.org/jira/browse/OAK-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13944910#comment-13944910
 ] 

Marcel Reutegger commented on OAK-1585:
---------------------------------------

Patch looks good and I see you already applied it. Anything else that needs to 
be done here?

> rollback logic issues incorrect Updates
> ---------------------------------------
>
>                 Key: OAK-1585
>                 URL: https://issues.apache.org/jira/browse/OAK-1585
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: mongomk
>    Affects Versions: 0.19
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>             Fix For: 0.20
>
>         Attachments: OAK-1585.diff
>
>
> The commit logic tries to roll back changes by reversing the update 
> operations and applying them using ds.createOrUpdate().
> However, when the operations that needs to be undone is a "create", the 
> generated Update will only contain removal of properties, but no setting of 
> "_id". If, at this point, the document does not exist in the persistence, a 
> new empty document will be created,
> It appears that this problem can be avoided by using findAndUpdate() instead 
> of createOrUpdate(). 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to