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

Marcel Reutegger commented on OAK-7745:
---------------------------------------

The MongoDS behaviour looks rather wrong to me in this case. The DocumentStore 
must not create the document when isNew is false. I think the the MongoDS 
implementation should be fixed and not create the document in this case.

The other question is how to clarify the contract. As discussed offline, there 
are at least two options on the table:
- Throw an DocumentStoreException when the document does not exist and the 
{{UpdateOp}} has isNew set to false.
- Return null to indicate the update didn't happen

I have a slight preference for the second option because it allows 
{{DocumentStore.createOrUpdate(Collection, List<UpdateOp>)}} to succeed and 
return a caller more structured information about the result of each update 
operation.

> Clarify update semantics on deleted nodes
> -----------------------------------------
>
>                 Key: OAK-7745
>                 URL: https://issues.apache.org/jira/browse/OAK-7745
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: documentmk
>            Reporter: Julian Reschke
>            Priority: Major
>         Attachments: OAK-7745-basic.diff, OAK-7745.diff
>
>
> It's not entirely clear to me what behavior we expect if:
>  
>  * node 1 creates a document
>  * node 2 deletes it
>  * node 1 tries to update it
> (and, related to that, whether the behavior really matters in practice)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to