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 "Thomas Mueller (JIRA)" <ji...@apache.org> on 2017/02/07 10:55:41 UTC

[jira] [Commented] (OAK-5587) Node counter index estimates must not be used before first async index cycle

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

Thomas Mueller commented on OAK-5587:
-------------------------------------

We can check if the hidden node "/oak:index/counter/:index" data exists. There are 3 cases where the node doesn't exist:

* a) The index update was never run so far (at first startup, before the index update was run)
* b) There are very few nodes in the repository (unlikely)
* c) The node counter index was removed (unlikely)

For cases a) and c), the node counter needs to report that the number of nodes is unknown. For case b), it would be best if the estimated number of nodes is low, however it is hard or impossible to distinguish that case. So my patch will also return "unknown" in that case; I don't think this is a problem.

> Node counter index estimates must not be used before first async index cycle
> ----------------------------------------------------------------------------
>
>                 Key: OAK-5587
>                 URL: https://issues.apache.org/jira/browse/OAK-5587
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>             Fix For: 1.6.1
>
>
> Oak traversing index returns a very low estimate when first async index cycle hasn't completed yet, so that the wrong index can be used on first startup.
> NodeCounter#getCombinedCost() should treat non-existing /oak:index/counter/:index same as /oak:index/counter not existing.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)