[ https://issues.apache.org/jira/browse/OAK-8988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17096327#comment-17096327 ]
Amit Jain commented on OAK-8988: -------------------------------- Yes, the key thing is that within the same JVM it works as documented above. But when there are 2 JVMs involved with one already holding the lock and the second trying to acquire the lock, the second instance waits indefinitely. There may be different behaviors on different platforms but that the obsereved behavior on linux. > TarPersistence.lockRepostiory can indefinitely wait if another external > process already running > ----------------------------------------------------------------------------------------------- > > Key: OAK-8988 > URL: https://issues.apache.org/jira/browse/OAK-8988 > Project: Jackrabbit Oak > Issue Type: Bug > Components: segment-tar > Reporter: Amit Jain > Priority: Major > > TarPersistence.lockRepostiory() [1] waits indefinitely when another segment > tar process is already running and has acquired the lock already. The method > should timeout if it fails to obtain a lock in a reasonable time (can be an > internal value) or have alternative means ascertaining that another process > already running e.g. by using mkdir(). > 1 - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/tar/TarPersistence.java#L92-L103|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/tar/TarPersistence.java#L92-L103] -- This message was sent by Atlassian Jira (v8.3.4#803005)