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 "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2016/06/06 05:42:59 UTC

[jira] [Created] (OAK-4431) Index path property should be considered optional for copy on read logic

Chetan Mehrotra created OAK-4431:
------------------------------------

             Summary: Index path property should be considered optional for copy on read logic
                 Key: OAK-4431
                 URL: https://issues.apache.org/jira/browse/OAK-4431
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: lucene
            Reporter: Chetan Mehrotra
            Assignee: Chetan Mehrotra
             Fix For: 1.6


As part of changes done for OAK-4347 logic assumes that indexPath is always non null. This works fine for fresh setup where the indexPath would have been set by the initial indexing. However for upgraded setup this assumption would break as it might happen that index does not get updated with new approach and before that a read is performed.

Currently with updated code on upgraded setup following exception is seen 

{noformat}
Caused by: javax.security.auth.login.LoginException: java.lang.NullPointerException: Index path property [:indexPath] not found
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:236)
        at org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition.getIndexPathFromConfig(IndexDefinition.java:664)
        at org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier.getSharedWorkingSet(IndexCopier.java:242)
        at org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier.wrapForRead(IndexCopier.java:140)
        at org.apache.jackrabbit.oak.plugins.index.lucene.IndexNode.open(IndexNode.java:53)
        at org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker.findIndexNode(IndexTracker.java:179)
        at org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker.acquireIndexNode(IndexTracker.java:154)
        at org.apache.jackrabbit.oak.plugins.index.lucene.LucenePropertyIndex.getPlans(LucenePropertyIndex.java:250)
{noformat}

For this specific flow the indexPath can be passed in and not looked up from IndexDefinition



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