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 "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2016/06/27 06:51:52 UTC

[jira] [Resolved] (OAK-4507) [oak-mongo.js] oak.indexStats() does not compute counts properly

     [ https://issues.apache.org/jira/browse/OAK-4507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger resolved OAK-4507.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.5.5

Thanks for the patch. I applied it to trunk: http://svn.apache.org/r1750279

I agree, it would be somewhat cleaner to push the logic into the pathFilter method. However, it is also used by other methods and the last element of the path parameter may also be a prefix. I think it is safer the way you proposed to fix it.

> [oak-mongo.js] oak.indexStats() does not compute counts properly
> ----------------------------------------------------------------
>
>                 Key: OAK-4507
>                 URL: https://issues.apache.org/jira/browse/OAK-4507
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: run
>    Affects Versions: 1.0, 1.2, 1.4
>            Reporter: Kevin Wellenzohn
>            Assignee: Marcel Reutegger
>            Priority: Trivial
>             Fix For: 1.6, 1.5.5
>
>         Attachments: OAK-4507.patch
>
>
> Some methods in oak-mongo.js that use the pathFilter function consider paths that they shouldn't consider. For example, in a AEM installation oak.countChildren("/oak:index/slingResource") counts the children of the following paths:
> - /oak:index/slingResource
> - /oak:index/slingResourceSuperType
> - /oak:index/slingResourceType
> - /oak:index/slingResources
> The reason is that pathFilter function builds a RegExp that is not terminated by a path separator and hence matches more paths than it should.
> Issues occur in the following functions:
> - oak.indexStats()
> - oak.countChildren()
> - oak.forEachChild()
> - oak.getChildStats()



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