You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Richa Khurana (JIRA)" <ji...@apache.org> on 2009/01/19 13:41:59 UTC

[jira] Created: (JCR-1940) Exception when concurrently adding documents to Jack rabbit repository with clustering enabled

Exception when concurrently adding documents to Jack rabbit repository with clustering enabled
----------------------------------------------------------------------------------------------

                 Key: JCR-1940
                 URL: https://issues.apache.org/jira/browse/JCR-1940
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-core
    Affects Versions: 1.5.0
         Environment: OS - Win 2000
JackRabbit Jars - 1.5

            Reporter: Richa Khurana
            Priority: Blocker


We have a enabled jackrabbit clustering. In this mode following exception occurs when 2 users simultaneouly add documents to Jack rabbit repository registered with node id 1 and 2 respectively-

14:59:55,312 ERROR [DocumentHelper] Exception occurred while adding a manually uploaded document to the jackrabbit:
javax.jcr.InvalidItemStateException: cafebabe-cafe-babe-cafe-babecafebabe has been modified externally
        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1109)
        at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:846)

Another observation is that when we disable clustering and both users have same node id in cluster configuration in repository.xml, the error doesnt appear.




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


[jira] Reopened: (JCR-1940) Exception when concurrently adding documents to Jack rabbit repository with clustering enabled

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

Richa Khurana reopened JCR-1940:
--------------------------------


> Exception when concurrently adding documents to Jack rabbit repository with clustering enabled
> ----------------------------------------------------------------------------------------------
>
>                 Key: JCR-1940
>                 URL: https://issues.apache.org/jira/browse/JCR-1940
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.5.0
>         Environment: OS - Win 2000
> JackRabbit Jars - 1.5
>            Reporter: Richa Khurana
>
> We have a enabled jackrabbit clustering. In this mode following exception occurs when 2 users simultaneouly add documents to Jack rabbit repository registered with node id 1 and 2 respectively-
> 14:59:55,312 ERROR [DocumentHelper] Exception occurred while adding a manually uploaded document to the jackrabbit:
> javax.jcr.InvalidItemStateException: cafebabe-cafe-babe-cafe-babecafebabe has been modified externally
>         at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1109)
>         at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:846)
> Another observation is that when we disable clustering and both users have same node id in cluster configuration in repository.xml, the error doesnt appear.

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


[jira] Commented: (JCR-1940) Exception when concurrently adding documents to Jack rabbit repository with clustering enabled

Posted by "Richa Khurana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674020#action_12674020 ] 

Richa Khurana commented on JCR-1940:
------------------------------------

This is not normal if you have a JR repo in DB. If 2 nodes cannot simultaneuly add documents to a JR repository then whats the point of clustering. Please help.

> Exception when concurrently adding documents to Jack rabbit repository with clustering enabled
> ----------------------------------------------------------------------------------------------
>
>                 Key: JCR-1940
>                 URL: https://issues.apache.org/jira/browse/JCR-1940
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.5.0
>         Environment: OS - Win 2000
> JackRabbit Jars - 1.5
>            Reporter: Richa Khurana
>
> We have a enabled jackrabbit clustering. In this mode following exception occurs when 2 users simultaneouly add documents to Jack rabbit repository registered with node id 1 and 2 respectively-
> 14:59:55,312 ERROR [DocumentHelper] Exception occurred while adding a manually uploaded document to the jackrabbit:
> javax.jcr.InvalidItemStateException: cafebabe-cafe-babe-cafe-babecafebabe has been modified externally
>         at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1109)
>         at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:846)
> Another observation is that when we disable clustering and both users have same node id in cluster configuration in repository.xml, the error doesnt appear.

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


[jira] Reopened: (JCR-1940) Exception when concurrently adding documents to Jack rabbit repository with clustering enabled

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

Richa Khurana reopened JCR-1940:
--------------------------------


> Exception when concurrently adding documents to Jack rabbit repository with clustering enabled
> ----------------------------------------------------------------------------------------------
>
>                 Key: JCR-1940
>                 URL: https://issues.apache.org/jira/browse/JCR-1940
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.5.0
>         Environment: OS - Win 2000
> JackRabbit Jars - 1.5
>            Reporter: Richa Khurana
>
> We have a enabled jackrabbit clustering. In this mode following exception occurs when 2 users simultaneouly add documents to Jack rabbit repository registered with node id 1 and 2 respectively-
> 14:59:55,312 ERROR [DocumentHelper] Exception occurred while adding a manually uploaded document to the jackrabbit:
> javax.jcr.InvalidItemStateException: cafebabe-cafe-babe-cafe-babecafebabe has been modified externally
>         at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1109)
>         at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:846)
> Another observation is that when we disable clustering and both users have same node id in cluster configuration in repository.xml, the error doesnt appear.

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


[jira] Updated: (JCR-1940) Exception when concurrently adding documents to Jack rabbit repository with clustering enabled

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

Alexander Klimetschek updated JCR-1940:
---------------------------------------

    Priority: Major  (was: Blocker)

It is perfectly valid to get an InvalidItemStateException if two different sessions (whether on the same standalone jackrabbit or on different cluster nodes) write to the same node or add nodes to the same parent. See the JCR specification, for example section 7.1.3.3: http://www.day.com/specs/jcr/1.0/7.1.3.3_Invalid_Items.html

You noted that the problem does not occur when you turn off clustering, which might indicate a bug. Could you please elaborate on what changes you made concurrently and check if the process (and timing...) is exactly the same in the two situations?

> Exception when concurrently adding documents to Jack rabbit repository with clustering enabled
> ----------------------------------------------------------------------------------------------
>
>                 Key: JCR-1940
>                 URL: https://issues.apache.org/jira/browse/JCR-1940
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.5.0
>         Environment: OS - Win 2000
> JackRabbit Jars - 1.5
>            Reporter: Richa Khurana
>
> We have a enabled jackrabbit clustering. In this mode following exception occurs when 2 users simultaneouly add documents to Jack rabbit repository registered with node id 1 and 2 respectively-
> 14:59:55,312 ERROR [DocumentHelper] Exception occurred while adding a manually uploaded document to the jackrabbit:
> javax.jcr.InvalidItemStateException: cafebabe-cafe-babe-cafe-babecafebabe has been modified externally
>         at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1109)
>         at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:846)
> Another observation is that when we disable clustering and both users have same node id in cluster configuration in repository.xml, the error doesnt appear.

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


[jira] Resolved: (JCR-1940) Exception when concurrently adding documents to Jack rabbit repository with clustering enabled

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

Jukka Zitting resolved JCR-1940.
--------------------------------

    Resolution: Invalid

I'm resolving this as Invalid based on Alexander's comment.

Note that your comment "both users have same node id in cluster configuration in repository.xml" sounds like a major misconfiguration. If you have multiple Jackrabbit instances accessing the same content, then they *must* be configured as cluster nodes with separate node ids.

> Exception when concurrently adding documents to Jack rabbit repository with clustering enabled
> ----------------------------------------------------------------------------------------------
>
>                 Key: JCR-1940
>                 URL: https://issues.apache.org/jira/browse/JCR-1940
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.5.0
>         Environment: OS - Win 2000
> JackRabbit Jars - 1.5
>            Reporter: Richa Khurana
>
> We have a enabled jackrabbit clustering. In this mode following exception occurs when 2 users simultaneouly add documents to Jack rabbit repository registered with node id 1 and 2 respectively-
> 14:59:55,312 ERROR [DocumentHelper] Exception occurred while adding a manually uploaded document to the jackrabbit:
> javax.jcr.InvalidItemStateException: cafebabe-cafe-babe-cafe-babecafebabe has been modified externally
>         at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1109)
>         at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:846)
> Another observation is that when we disable clustering and both users have same node id in cluster configuration in repository.xml, the error doesnt appear.

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


[jira] Commented: (JCR-1940) Exception when concurrently adding documents to Jack rabbit repository with clustering enabled

Posted by "Richa Khurana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674017#action_12674017 ] 

Richa Khurana commented on JCR-1940:
------------------------------------

WRT Comment-""both users have same node id in cluster configuration in repository.xml" sounds like a major misconfiguration. If you have multiple Jackrabbit instances accessing the same content, then they *must* be configured as cluster nodes with separate node ids."

--- Please note that the node ids are different only, it was just an observation that i added that the same exception stops to appear when we set the same node ids

WRT Comment-"It is perfectly valid to get an InvalidItemStateException if two different sessions (whether on the same standalone jackrabbit or on different cluster nodes) write to the same node or add nodes to the same parent. See the JCR specification, for example section 7.1.3.3: http://www.day.com/specs/jcr/1.0/7.1.3.3_Invalid_Items.html "

Please be noted that each environment is pointing to jackrabbit repository in the DB and not any shared folder on the Local File System


Please let me know if any more info is reqd.


> Exception when concurrently adding documents to Jack rabbit repository with clustering enabled
> ----------------------------------------------------------------------------------------------
>
>                 Key: JCR-1940
>                 URL: https://issues.apache.org/jira/browse/JCR-1940
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.5.0
>         Environment: OS - Win 2000
> JackRabbit Jars - 1.5
>            Reporter: Richa Khurana
>
> We have a enabled jackrabbit clustering. In this mode following exception occurs when 2 users simultaneouly add documents to Jack rabbit repository registered with node id 1 and 2 respectively-
> 14:59:55,312 ERROR [DocumentHelper] Exception occurred while adding a manually uploaded document to the jackrabbit:
> javax.jcr.InvalidItemStateException: cafebabe-cafe-babe-cafe-babecafebabe has been modified externally
>         at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1109)
>         at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:846)
> Another observation is that when we disable clustering and both users have same node id in cluster configuration in repository.xml, the error doesnt appear.

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


[jira] Resolved: (JCR-1940) Exception when concurrently adding documents to Jack rabbit repository with clustering enabled

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

Jukka Zitting resolved JCR-1940.
--------------------------------

    Resolution: Invalid
      Assignee: Jukka Zitting

As I said, please use the users@jackrabbit.apache.org mailing list instead of reopening this issue.

There are well defined ways in JCR for avoiding this issue. JCR-584 (available since Jackrabbit 1.2) is one, separate subtrees is another, and the JCR locking feature yet another.

Clustering makes this issue somewhat more prominent, but see JCR-1753 for a proposed mechanism to better deal with the clustering delay.

The current consensus is that these "has been modified externally" exceptions are perfectly acceptable. And as mentioned by Alexander, they are also explicitly allowed by the JCR specification. You're of course welcome to challenge this consensus, but I'd propose that you rather do that on the dev@jackrabbit.apache.org mailing list and follow up with an improvement issue once there's a clearer idea of what you'd like to change.

> Exception when concurrently adding documents to Jack rabbit repository with clustering enabled
> ----------------------------------------------------------------------------------------------
>
>                 Key: JCR-1940
>                 URL: https://issues.apache.org/jira/browse/JCR-1940
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.5.0
>         Environment: OS - Win 2000
> JackRabbit Jars - 1.5
>            Reporter: Richa Khurana
>            Assignee: Jukka Zitting
>
> We have a enabled jackrabbit clustering. In this mode following exception occurs when 2 users simultaneouly add documents to Jack rabbit repository registered with node id 1 and 2 respectively-
> 14:59:55,312 ERROR [DocumentHelper] Exception occurred while adding a manually uploaded document to the jackrabbit:
> javax.jcr.InvalidItemStateException: cafebabe-cafe-babe-cafe-babecafebabe has been modified externally
>         at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1109)
>         at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:846)
> Another observation is that when we disable clustering and both users have same node id in cluster configuration in repository.xml, the error doesnt appear.

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


[jira] Resolved: (JCR-1940) Exception when concurrently adding documents to Jack rabbit repository with clustering enabled

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

Jukka Zitting resolved JCR-1940.
--------------------------------

    Resolution: Invalid

Re-resolving as Invalid.

Alexander's concern about a potential clustering issue would only have been valid if your non-clustered configuration would have been correct. As it stands, you're seeing normal Jackrabbit behaviour described by Alexander.

Please contact the users@jackrabbit.apache.org list for more background on why Jackrabbit does this, and for ways to avoid such issues. The issue tracker is only for cases where changes to Jackrabbit behaviour is needed.

> Exception when concurrently adding documents to Jack rabbit repository with clustering enabled
> ----------------------------------------------------------------------------------------------
>
>                 Key: JCR-1940
>                 URL: https://issues.apache.org/jira/browse/JCR-1940
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.5.0
>         Environment: OS - Win 2000
> JackRabbit Jars - 1.5
>            Reporter: Richa Khurana
>
> We have a enabled jackrabbit clustering. In this mode following exception occurs when 2 users simultaneouly add documents to Jack rabbit repository registered with node id 1 and 2 respectively-
> 14:59:55,312 ERROR [DocumentHelper] Exception occurred while adding a manually uploaded document to the jackrabbit:
> javax.jcr.InvalidItemStateException: cafebabe-cafe-babe-cafe-babecafebabe has been modified externally
>         at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1109)
>         at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:846)
> Another observation is that when we disable clustering and both users have same node id in cluster configuration in repository.xml, the error doesnt appear.

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