jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timur Evdokimov" <ti...@jacum.com>
Subject Lock obsession
Date Thu, 17 Feb 2005 21:45:14 GMT

Hello everyone again,

Yet another problem with Jackrabbit that bothers me are regular stacktraces
thrown by Lucene indexer on Session.save() method.

2005-02-17 22:34:01,296 ERROR   [      :             :         ] -
SearchManager                  - error indexing node.
java.io.IOException: Lock obtain timed out: Lock@write.lock
        at org.apache.lucene.store.Lock.obtain(Lock.java:58)
        at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:223)
        at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:213)
        at
org.apache.jackrabbit.core.search.lucene.AbstractIndex.getIndexWriter(Abstra
ctIndex.java:108)
        at
org.apache.jackrabbit.core.search.lucene.AbstractIndex.addDocument(AbstractI
ndex.java:82)
        at
org.apache.jackrabbit.core.search.lucene.SearchIndex.addNode(SearchIndex.jav
a:124)
        at
org.apache.jackrabbit.core.SearchManager.addNode(SearchManager.java:158)
        at
org.apache.jackrabbit.core.SearchManager.onEvent(SearchManager.java:300)
        at
org.apache.jackrabbit.core.observation.EventConsumer.consumeEvents(EventCons
umer.java:196)
        at
org.apache.jackrabbit.core.observation.ObservationManagerFactory.dispatchEve
nts(ObservationManagerFactory.java:216)
        at
org.apache.jackrabbit.core.observation.EventStateCollection.dispatch(EventSt
ateCollection.java:218)
        at
org.apache.jackrabbit.core.SessionImpl.dispatch(SessionImpl.java:332)
        at
org.apache.jackrabbit.core.XASessionImpl.dispatch(XASessionImpl.java:308)
        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1281)
        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:674)

I haven't found exact patterns - how exactly it happens - but it seems that
if there were changes during the session: like adding/deleting nodes and/or
updating properties, I get something like this:

2005-02-17 22:39:48,968 ERROR   [      :             :         ] -
SearchManager                  - error indexing node.
java.io.IOException: Lock obtain timed out: Lock@write.lock
        at org.apache.lucene.store.Lock.obtain(Lock.java:58)
        at
org.apache.lucene.index.IndexReader.aquireWriteLock(IndexReader.java:408)
        at org.apache.lucene.index.IndexReader.delete(IndexReader.java:432)
        at org.apache.lucene.index.IndexReader.delete(IndexReader.java:454)
        at
org.apache.jackrabbit.core.search.lucene.AbstractIndex.removeDocument(Abstra
ctIndex.java:86)
        at
org.apache.jackrabbit.core.search.lucene.SearchIndex.deleteNode(SearchIndex.
java:155)
        at
org.apache.jackrabbit.core.SearchManager.deleteNode(SearchManager.java:172)
        at
org.apache.jackrabbit.core.SearchManager.onEvent(SearchManager.java:259)
        at
org.apache.jackrabbit.core.observation.EventConsumer.consumeEvents(EventCons
umer.java:196)
        at
org.apache.jackrabbit.core.observation.ObservationManagerFactory.dispatchEve
nts(ObservationManagerFactory.java:216)
        at
org.apache.jackrabbit.core.observation.EventStateCollection.dispatch(EventSt
ateCollection.java:218)
        at
org.apache.jackrabbit.core.SessionImpl.dispatch(SessionImpl.java:332)
        at
org.apache.jackrabbit.core.XASessionImpl.dispatch(XASessionImpl.java:308)
        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1281)
        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:674)

What is quite surprising is that despite these exceptions, repository does
function properly - everything is saved and retrieved like a clockwork!

My repository.xml looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>

<Repository>
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
        <param name="path" value="${rep.home}"/>
    </FileSystem>

    <Workspaces rootPath="${rep.home}/workspaces"
defaultWorkspace="default"/>

    <Workspace name="${wsp.name}">
        <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${wsp.home}/ws"/>
        </FileSystem>

        <PersistenceManager
class="org.apache.jackrabbit.core.state.obj.ObjectPersistenceManager"/>

        <SearchIndex>
            <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
                <param name="path" value="${wsp.home}/index"/>
            </FileSystem>
        </SearchIndex>
    </Workspace>

    <Versioning rootPath="${rep.home}/version">

          <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
              <param name="path" value="${rep.home}/version"/>
          </FileSystem>
        <PersistenceManager
class="org.apache.jackrabbit.core.state.obj.ObjectPersistenceManager"/>

    </Versioning>

</Repository>

I'm not sure whether this is inherent Jackrabbit problem, or Lucene problem,
or org.apache.jackrabbit.core.fs.local.LocalFileSystem problem... Anyway,
does it ring a bell?


Best regards,
Timur


Mime
View raw message