You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Julian Reschke (JIRA)" <ji...@apache.org> on 2014/03/20 15:32:42 UTC

[jira] [Created] (OAK-1585) rollback logic issues incorrect Updates

Julian Reschke created OAK-1585:
-----------------------------------

             Summary: 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)