[
https://issues.apache.org/jira/browse/OAK-2341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vikas Saurabh updated OAK-2341:
-------------------------------
Attachment: 0004-OAK-2341-approximately-scale-property-index-cost-usi.patch
0003-OAK-2341-Add-test-case-for-ContentMirrorStoreStrateg.patch
0002-OAK-2341-Refactor-ContentMirrorStoreStategy-count-a-.patch
0001-OAK-2341-A-bit-of-refactor-to-make-root-NodeState-av.patch
Attached a couple of patches. Here's a small description of what each does:
# 0001* - We required root NodeState to be available in count method to use
{{NodeCounter.getEstimatedNodeCount(root, path, max)}} method.
# 0002* - Earlier, count method used to return costs from different points in
the method. Refactored that to have single return from it -- this is useful for
scaling down all cases when path restriction is available
# 0003* - Added some test cases for ContentMirrorStoreStrategy. This patch also
has an {{Ignored}} test case to test path restriction
# 0004* - Use {{NodeCounter.getEstimatedNodeCount}} method to approximately
scale down the cost calculated as if path restriction wasn't there.
[~tmueller], can you please review these.
> Use approx counters property index costs even when path restriction is
> available
> --------------------------------------------------------------------------------
>
> Key: OAK-2341
> URL: https://issues.apache.org/jira/browse/OAK-2341
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Affects Versions: 1.1.3
> Reporter: Vikas Saurabh
> Attachments:
> 0001-OAK-2341-A-bit-of-refactor-to-make-root-NodeState-av.patch,
> 0002-OAK-2341-Refactor-ContentMirrorStoreStategy-count-a-.patch,
> 0003-OAK-2341-Add-test-case-for-ContentMirrorStoreStrateg.patch,
> 0004-OAK-2341-approximately-scale-property-index-cost-usi.patch
>
>
> Currently, cost calculation of property index follows following psuedo-code:
> * For "is not null" case:
> ## return {{entryCount}} || approximate counted indexed nodes
> ## if above doesn't work out, do a partial traversal and return extrapolated
> cost
> * For property in (a, b, ...) or property==value case:
> ## return {{entryCount}}/{{keyCount}} || approximate counted index nodes for
> each key (a, b, etc)
> ## if above doesn't work out, do a partial traversal over whole indexed tree
> or sub-tree (if path restriction is available) and return extrapolated cost
> approx counter on index is used only if {{entryCount}} property is missing in
> index definition node.
> The issue in step 1 in both cases is that it doesn't consider path
> restriction if it's given in the query.
> The only place where path restriction is being considered is in case2->step2.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)