Description
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
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)
For this specific flow the indexPath can be passed in and not looked up from IndexDefinition
Attachments
Issue Links
- is broken by
-
OAK-4347 Use the indexPath from hidden property instead of taking this as input as part of index config
- Closed