[
https://issues.apache.org/jira/browse/OAK-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marcel Reutegger closed OAK-1895.
---------------------------------
> ClassCastException can occur if the TraversalIndex is cheaper than an
> OrderedIndex (or a different AdvancedQueryIndex impl)
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: OAK-1895
> URL: https://issues.apache.org/jira/browse/OAK-1895
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: query
> Reporter: Justin Edelson
> Assignee: Justin Edelson
> Fix For: 1.0.2, 1.1
>
>
> Because the TraversalIndex is added last, the `bestPlan` variable will be
> non-null if an OrderedIndex was usable for the query. If the TraversalIndex
> ends up being cheaper, then the `bestIndex` variable is set to the
> TraveralIndex, but the `bestPlan` remains set to a non-null value.
> Later, in SelectorImpl, the fact that the plan is non-null causes the index
> to be cast to AdvancedQueryIndex which fails with a ClassCastException.
--
This message was sent by Atlassian JIRA
(v6.2#6252)