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

2014-03-24 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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)


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

2014-03-24 Thread Julian Reschke (JIRA)

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

Julian Reschke commented on OAK-1585:
-

[~mreutegg] Nope, I just wanted to see your feedback before closing it.

 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)