You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2007/10/10 14:48:51 UTC

[jira] Created: (JCR-1170) Repository lock keeps file open

Repository lock keeps file open
-------------------------------

                 Key: JCR-1170
                 URL: https://issues.apache.org/jira/browse/JCR-1170
             Project: Jackrabbit
          Issue Type: Bug
          Components: jackrabbit-core
         Environment: Linux
            Reporter: Thomas Mueller
            Assignee: Thomas Mueller
            Priority: Minor


The RepositoryLock opens a RandomAccessFile, but does not close it. The problematic line is:

lock = new RandomAccessFile(file, "rw").getChannel().tryLock();

This is usually not a problem as the file will be closed when the RandomAccessFile object is garbage collected. However, if called a lot in a short time frame, this results in 'too many open files' in some environments (for example Linux). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1170) Repository lock keeps file open

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-1170:
-------------------------------

        Fix Version/s: 1.4
    Affects Version/s: 0.9
                       1.0
                       1.0.1
                       1.1
                       1.1.1
                       1.2.1
                       1.2.2
                       1.2.3
                       1.3
                       1.3.1
                       1.3.3

> Repository lock keeps file open
> -------------------------------
>
>                 Key: JCR-1170
>                 URL: https://issues.apache.org/jira/browse/JCR-1170
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 0.9, 1.0, 1.0.1, 1.1, 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.3, 1.3.1, 1.3.3
>         Environment: Linux
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Minor
>             Fix For: 1.4
>
>
> The RepositoryLock opens a RandomAccessFile, but does not close it. The problematic line is:
> lock = new RandomAccessFile(file, "rw").getChannel().tryLock();
> This is usually not a problem as the file will be closed when the RandomAccessFile object is garbage collected. However, if called a lot in a short time frame, this results in 'too many open files' in some environments (for example Linux). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JCR-1170) Repository lock keeps file open

Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Mueller resolved JCR-1170.
---------------------------------

    Resolution: Fixed

Revision 31357: Now the RandomAccessFile is closed when locking failed and when unlocking.

> Repository lock keeps file open
> -------------------------------
>
>                 Key: JCR-1170
>                 URL: https://issues.apache.org/jira/browse/JCR-1170
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>         Environment: Linux
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Minor
>
> The RepositoryLock opens a RandomAccessFile, but does not close it. The problematic line is:
> lock = new RandomAccessFile(file, "rw").getChannel().tryLock();
> This is usually not a problem as the file will be closed when the RandomAccessFile object is garbage collected. However, if called a lot in a short time frame, this results in 'too many open files' in some environments (for example Linux). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.