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

Stefan Egli edited comment on OAK-10660 at 2/26/24 9:17 AM:
------------------------------------------------------------

In DocumentNodeStore the revisions are actually already tracked in the 
{{org.apache.jackrabbit.oak.plugins.document.Branch}} - which is reachable via 
the {{org.apache.jackrabbit.oak.plugins.document.UnmergedBranches}} - try
{noformat}
// rev being the branch commit revision vector
dns.getBranches().getBranch(rev);
{noformat}

That contains the unmerged branches of the local instance - which I guess is 
what we want (IOW I don't think we need a new revisions set)


was (Author: egli):
In DocumentNodeStore the revisions are actually already tracked in the 
{{org.apache.jackrabbit.oak.plugins.document.Branch}} - which is reachable via 
the {{org.apache.jackrabbit.oak.plugins.document.UnmergedBranches}} - try
{noformat}
// rev being the branch commit revision vector
dns.getBranches().getBranch(rev);
{noformat}

That contains the unmerged branches of the local instance - which I guess is 
what we want.

> DocumentNodeStore: avoid repeated commits of :childOrder in branch commits
> --------------------------------------------------------------------------
>
>                 Key: OAK-10660
>                 URL: https://issues.apache.org/jira/browse/OAK-10660
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Major
>
> - While persisting the branch commits, we are persisting large :childOrder 
> properties repeatedly. In practice, only the last value is needed, so the 
> previous ones could be cleaned up.
>  - We currently do not keep information about when (revision) and where (_id) 
> we have set :childOrder.
>  - The "clean" approach would be to maintain a map of _id/revision that tells 
> us in which revision we last set :childOrder. That could be used to pair the 
> setting of the new value with a removal of the previous one.
>  - But we may be able to simplify that: just maintain a list of _all_ 
> revisions that changed :childOrder, and any time we need to set a new value 
> for :childOrder, nuke the entries for all of these revisions. This would be 
> harmless because an extra REMOVE_MAP_ENTRY operation is essentially free, 
> except fo ra small overhead in processing.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to