[
https://issues.apache.org/jira/browse/OAK-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14382060#comment-14382060
]
Marcel Reutegger commented on OAK-2669:
---------------------------------------
I also don't particularly like the {{ContentChangeInfo}} hidden behind the
{{ContentChangeInfoProvider}} interface. But I think it is a good prototype to
validate the general approach with the local diff cache. At least for the root
node revision part of the {{ContentChangeInfo}} we could get rid of it by
implementing OAK-2685. The root revision would then be available in any
{{DocumentNodeState}}. The isLocalChange() can probably also be replace with a
check for a matching base revision in the consolidated diff. I'll come up with
a patch for OAK-2685 and then we may be able to merge the two ideas and remove
the {{ContentChangeInfo}}.
> Use Consolidated diff for local changes with persistent cache to avoid
> calculating diff again
> ---------------------------------------------------------------------------------------------
>
> Key: OAK-2669
> URL: https://issues.apache.org/jira/browse/OAK-2669
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: mongomk
> Reporter: Chetan Mehrotra
> Fix For: 1.3.0
>
> Attachments: OAK-2669-A.patch
>
>
> Currently the diff logic in DocumentMK makes use of DiffCache which has an in
> memory implementation and a Mongo based implementation. Given that we need to
> have a fast observation support for local changes it would be better to make
> use of persistent cache. After discussing with [~mreutegg] following changes
> need to be done in current logic
> # Have the Commit#applyChanges push the commit diff to persistent cache with
> current commit revision as key
> # In compare pull out the diff from persistent cache and if present use that.
> Note that this diff is for complete tree compared to current JSOP diff used
> which is only per node level. So need to change the way diff is pushed back
> to NodeStateDiff
> Above change should avoid hitting mongo all together for determining the
> diff. Only extra work performed in diff calculation would be determining the
> node state view for the base revision. Later we can think of also include
> node state base revision as part of diff so as to avoid this extra work all
> together and rely on node state from persistent cache for that work also
> See also http://markmail.org/thread/bzmwcp7k4wmtw6od
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)