jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Leung (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-692) XMLPersistenceManager fails after creating too many directories on linux
Date Thu, 28 Dec 2006 22:02:21 GMT
XMLPersistenceManager fails after creating too many directories on linux
------------------------------------------------------------------------

                 Key: JCR-692
                 URL: http://issues.apache.org/jira/browse/JCR-692
             Project: Jackrabbit
          Issue Type: Bug
         Environment: linux (fedora core 5), ext3 fs, java1.6.0 
            Reporter: Ted Leung


When using the  XMLPersistenceManager it creates a bunch of directories in jackrabbit/home/version/data.
Eventually I reach 32000 directories in the data directory and subsequent writes fail.

I believe this is caused by XMLPersistenceManager.buildNodeFolderPath() method where it does

   if (cnt == 4 || cnt == 8) {
      sb.append('/');
   }

This causes the subdirectories to be 4 characters, 0-f i.e. 16^4 which is 65536, if what I'm
seeing is correct, on linux ext3, it's limited to 32000 entries. If the XMLPersistence manager
used 2 or 3 characters this should fix the problem, or if it were configurable it would also
solve this (I think).

an 
   ls jackrabbit/home/version/data | wc -l
returns 
   32001

A stack trace for when this happens is as follows :
Caused by: javax.jcr.RepositoryException: failed to write node state: da2cd5d1-9776-4dbe-a42b-842b0134dbfb:
failed to write node state: da2cd5d1-9776-4dbe-a42b-842b0134dbfb
        at org.apache.jackrabbit.core.version.AbstractVersionManager.createVersionHistory(AbstractVersionManager.java:181)
        at org.apache.jackrabbit.core.version.VersionManagerImpl$1.run(VersionManagerImpl.java:194)
        at org.apache.jackrabbit.core.version.VersionManagerImpl$DynamicESCFactory.doSourced(VersionManagerImpl.java:526)
        at org.apache.jackrabbit.core.version.VersionManagerImpl.createVersionHistory(VersionManagerImpl.java:191)
        at org.apache.jackrabbit.core.version.XAVersionManager.createVersionHistory(XAVersionManager.java:140)
        at org.apache.jackrabbit.core.ItemImpl.initVersionHistories(ItemImpl.java:754)
        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1166)
        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:805)
        ... 166 more
Caused by: org.apache.jackrabbit.core.state.ItemStateException: failed to write node state:
da2cd5d1-9776-4dbe-a42b-842b0134dbfb
        at org.apache.jackrabbit.core.state.xml.XMLPersistenceManager.store(XMLPersistenceManager.java:579)
        at org.apache.jackrabbit.core.state.AbstractPersistenceManager.store(AbstractPersistenceManager.java:66)
        at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:574)
        at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:697)
        at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:315)
        at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:291)
        at org.apache.jackrabbit.core.version.AbstractVersionManager.createVersionHistory(AbstractVersionManager.java:174)
        ... 173 more
Caused by: org.apache.jackrabbit.core.fs.FileSystemException: failed to create folder /home/cms/pepsiaccess/jackrabbit/home/version/data/da2c/d5d1/97764dbea42b842b0134dbfb
        at org.apache.jackrabbit.core.fs.local.LocalFileSystem.createFolder(LocalFileSystem.java:208)
        at org.apache.jackrabbit.core.fs.BasedFileSystem.createFolder(BasedFileSystem.java:99)
        at org.apache.jackrabbit.core.fs.FileSystemResource.makeParentDirs(FileSystemResource.java:100)
        at org.apache.jackrabbit.core.state.xml.XMLPersistenceManager.store(XMLPersistenceManager.java:517)
        ... 179 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message