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 2015/11/04 14:08:27 UTC

[jira] [Commented] (OAK-3578) DocumentStore API: introduce void variant of findAndUpdate

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

Julian Reschke commented on OAK-3578:
-------------------------------------

[~mreutegg] I looked for cases where the return value of {{findAndUpdate}} is only checked against {{null}}: there's one case in {{Collision}} in {{markCommitRoot()}} and two cases in {{DocumentNodeStore}}: {{merge()}} and {{reset()}}; maybe you could have a look at these (should they possibly do more with the return value?)

There are a few other cases related to collections other than "nodes" which are probably unimportant...

> DocumentStore API: introduce void variant of findAndUpdate
> ----------------------------------------------------------
>
>                 Key: OAK-3578
>                 URL: https://issues.apache.org/jira/browse/OAK-3578
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>         Attachments: OAK-3578.diff
>
>
> {{findAndUpdate}} returns the previous state of the document (when applicable). However, this information is not always needed by the caller and may be expensive to obtain.
> Thus split the API into two different methods, so that DocumentStore implementations can optimized the void variant.
> Proposal: {{void updateConditional}} and {{T findAndUpdateConditional}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)