[
https://issues.apache.org/jira/browse/OAK-6579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16166138#comment-16166138
]
Tomek Rękawek edited comment on OAK-6579 at 9/14/17 12:08 PM:
--------------------------------------------------------------
The attached patch: [^OAK-6579.patch] adds support for the MountInfoProvider in
the counter index. The indexing data for each mount is kept separately. Eg.
let's assume that we have two mounts: default and "libs" (/apps, /libs) with
following counts:
{noformat}
/content -> 50 children
/apps/myapp -> 100 children
/libs/sling -> 200 children
{noformat}
The indexing data will look as follows:
{noformat}
/oak:index/counter/:index/:cnt = 50
/oak:index/counter/:index/content/:cnt = 50
/oak:index/counter/:oak:mount-libs-index/:cnt = 300
/oak:index/counter/:oak:mount-libs-index/apps/:cnt = 100
/oak:index/counter/:oak:mount-libs-index/apps/myapp/:cnt = 100
/oak:index/counter/:oak:mount-libs-index/libs/:cnt = 200
/oak:index/counter/:oak:mount-libs-index/libs/sling/:cnt = 200
{noformat}
When reading the indexing data, the {{NodeCounter}} reads :cnt from each mount
and sums it up. For instance, when reading counter for the root, following
nodes will be read:
{noformat}
/oak:index/counter/:index/:cnt = 50
/oak:index/counter/:oak:mount-libs-index/:cnt = 300
{noformat}
and the result will be 350.
This way the indexing data (:oak:mount-libs-index) will be stored together with
the original data (/apps, /libs) and if we replace the {{libs}} mount, the
counters will stay correct.
was (Author: tomek.rekawek):
The attached patch: [^OAK-6579.patch] adds support for the MountInfoProvider in
the counter index. The indexing data for each mount is kept separately. Eg.
let's assume that we have two mounts: default and "libs" (/apps, /libs) with
following counts:
{noformat}
/content -> 50 children
/apps/myapp -> 100 children
/libs/sling -> 200 children
{noformat}
The indexing data will look as follows:
{noformat}
/oak:index/counter/:index/:cnt = 50
/oak:index/counter/:index/content/:cnt = 50
/oak:index/counter/:oak:mount-libs-index/:cnt = 300
/oak:index/counter/:oak:mount-libs-index/apps/:cnt = 100
/oak:index/counter/:oak:mount-libs-index/apps/myapp/:cnt = 100
/oak:index/counter/:oak:mount-libs-index/libs/:cnt = 200
/oak:index/counter/:oak:mount-libs-index/libs/sling/:cnt = 200
{noformat}
When reading the indexing data, the {{NodeCounter}} reads :cnt from each mount
and sums it up. For instance, when reading counter for the root, following
nodes will be read:
{noformat}
/oak:index/counter/:index/:cnt = 50
/oak:index/counter/:oak:mount-libs-index/:cnt = 300
{noformat}
and the result will be 350.
> Define how the counter index works in a composite setup
> -------------------------------------------------------
>
> Key: OAK-6579
> URL: https://issues.apache.org/jira/browse/OAK-6579
> Project: Jackrabbit Oak
> Issue Type: Task
> Components: composite, indexing
> Reporter: Robert Munteanu
> Assignee: Tomek Rękawek
> Fix For: 1.8, 1.7.8
>
> Attachments: OAK-6579.patch
>
>
> We need to see if this index can or should be adjusted to work in a composite
> environment.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)