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

Chetan Mehrotra commented on OAK-3595:
--------------------------------------

[~tmueller] Most likely the issue here is that in LucenePropertyIndex while 
plans are being calculated an exception is thrown and that causes the query to 
fail and thus eventually causing the repository to fail to register. 

Now not sure on the right way to fix it - Currently its fail fast. One way can 
be that QueryEngine catches any exception while getting plans from Index 
providers and ignore any index if there is an error. Or we fix 
LucenePropertyIndex to catch any exception and then ignore plan for that index.

> Repository fails to start after definition of lucene property index with 
> nullCheckEnabled on nt:base
> ----------------------------------------------------------------------------------------------------
>
>                 Key: OAK-3595
>                 URL: https://issues.apache.org/jira/browse/OAK-3595
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: lucene
>    Affects Versions: 1.2.4
>            Reporter: Tom Blackford
>            Assignee: Chetan Mehrotra
>
> * Set up a Lucene property index beneath /oak:index node on the ‘nt:base’ 
> node type.
> * Add a property index for 'testProp'
> * On the property index definition, set the following properties:
> ** analyzed (Boolean) : true
> ** isRegexp (Boolean) : true
> ** name (String) : testProp
> ** nodeScopeIndex (Boolean) : true
> ** nullCheckEnabled (Boolean) : true
> ** propertyIndex (Boolean) : true
> ** useInExcerpt (Boolean) : true
> * The following exception will start appearing in the logs:
> {code}
> 05.11.2015 16:52:23.524 *ERROR* [pool-7-thread-1] 
> org.apache.sling.commons.scheduler.impl.QuartzScheduler Exception during job 
> execution of 
> org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate@6540caf4 : 
> nullCheckEnabled can be set to true for property definition using regular 
> expression
> java.lang.IllegalStateException: nullCheckEnabled can be set to true for 
> property definition using regular expression
> at 
> org.apache.jackrabbit.oak.plugins.index.lucene.PropertyDefinition.validate(PropertyDefinition.java:200)
> at 
> org.apache.jackrabbit.oak.plugins.index.lucene.PropertyDefinition.<init>(PropertyDefinition.java:125)
> at 
> org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition$IndexingRule.collectPropConfigs(IndexDefinition.java:830)
> at 
> org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition$IndexingRule.<init>(IndexDefinition.java:650)
> at 
> org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition.collectIndexRules(IndexDefinition.java:555)
> at 
> org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition.<init>(IndexDefinition.java:240)
> at 
> org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition.<init>(IndexDefinition.java:217)
> at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditorContext.<init>(LuceneIndexEditorContext.java:143)
> at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.<init>(LuceneIndexEditor.java:134)
> at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditorProvider.getIndexEditor(LuceneIndexEditorProvider.java:63)
> at 
> org.apache.jackrabbit.oak.plugins.index.CompositeIndexEditorProvider.getIndexEditor(CompositeIndexEditorProvider.java:74)
> at 
> org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardIndexEditorProvider.getIndexEditor(WhiteboardIndexEditorProvider.java:52)
> at 
> org.apache.jackrabbit.oak.plugins.index.IndexUpdate.collectIndexEditors(IndexUpdate.ja
> {code}
> * Stop and Restart the repository
> ** The repository will fail to start with the following exception
> {code}
> [org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean]] ServiceEvent 
> REGISTERED
> 05.11.2015 16:48:28.238 *ERROR* [FelixStartLevel] 
> com.adobe.granite.repository.impl.SlingRepositoryManager start: Uncaught 
> Throwable trying to access Repository, calling stopRepository()
> java.lang.IllegalMonitorStateException: attempt to unlock read lock, not 
> locked by current thread
> at 
> java.util.concurrent.locks.ReentrantReadWriteLock$Sync.unmatchedUnlockException(ReentrantReadWriteLock.java:444)
> at 
> java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:428)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1341)
> at 
> java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:881)
> {code}



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

Reply via email to