You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Przemo Pakulski (JIRA)" <ji...@apache.org> on 2007/10/30 13:31:50 UTC

[jira] Created: (JCR-1197) ItemManager cache is getting out of sync

ItemManager cache is getting out of sync
----------------------------------------

                 Key: JCR-1197
                 URL: https://issues.apache.org/jira/browse/JCR-1197
             Project: Jackrabbit
          Issue Type: Bug
          Components: jackrabbit-core
    Affects Versions: 1.3.3, 1.4
            Reporter: Przemo Pakulski
            Priority: Critical
             Fix For: 1.4


It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.

ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Commented: (JCR-1197) ItemManager cache is getting out of sync

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541362 ] 

Stefan Guggisberg commented on JCR-1197:
----------------------------------------

my 2 cents: 

i don't believe that this issue is related to ItemManager's cache of ItemImpl instances.

<quote from ItemManager's javadoc>
The ItemManager's responsabilities are:
...
guaranteeing that there aren't multiple instances representing the same Node or Property associated with the same Session instance.
...
</quote from ItemManager's javadoc>

there's no need to explicitly evict cached ItemImpl instances from ItemManager's cache.
quite the contrary, doing so would violate the ItemManager's contract.

> ItemManager cache is getting out of sync
> ----------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Commented: (JCR-1197) ItemManager cache is getting out of sync

Posted by "Przemo Pakulski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540799 ] 

Przemo Pakulski commented on JCR-1197:
--------------------------------------

Marcel, after applying your fix Jackrabbit tests passes, but my application tests don't. 
It seems that by removing this line some events can be missed, and index is not rebuilt correclty (node can be indexed twice after restore).

I think that problem is with caches that are not maintained correctly. I've tried to evict items from ItemManager cache during save(), but is hard to understand dependencies between all the caches, and I encountered another problem with dispatchindevents and HierarchyManager.

> ItemManager cache is getting out of sync
> ----------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Resolved: (JCR-1197) Node.restore() may throw InvalidItemStateException

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

Tobias Bocanegra resolved JCR-1197.
-----------------------------------

    Resolution: Fixed

not related to issue JCR-1293. so resolving it again.

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Assignee: Tobias Bocanegra
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Resolved: (JCR-1197) Node.restore() may throw InvalidItemStateException

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

Tobias Bocanegra resolved JCR-1197.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4

fixed as proposed.

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Assignee: Tobias Bocanegra
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Updated: (JCR-1197) Node.restore() may throw InvalidItemStateException

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

Alexander Klimetschek updated JCR-1197:
---------------------------------------

    Fix Version/s:     (was: 1.3.4)

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Assignee: Tobias Bocanegra
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Assigned: (JCR-1197) Node.restore() may throw InvalidItemStateException

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

Tobias Bocanegra reassigned JCR-1197:
-------------------------------------

    Assignee: Tobias Bocanegra

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3, 1.4
>            Reporter: Przemo Pakulski
>            Assignee: Tobias Bocanegra
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Commented: (JCR-1197) ItemManager cache is getting out of sync

Posted by "Przemo Pakulski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541292 ] 

Przemo Pakulski commented on JCR-1197:
--------------------------------------

Actually ItemManager is notified on ItemState changes (proper methods stateModifeid, stateDiscarded are called), but those methods do not invalidate the ItemManager cache.

I tried do evict item from cache in ItemManager by adding single line :


    public void stateModified(ItemState modified) {    	
        ItemImpl item = retrieveItem(modified.getId());
        if (item != null) {
            item.stateModified(modified);
+            evictItem(modified.getId());
        }
    }

but it doesn't work, seems that observation mechanism (triggered after disposing transient states, during stateMgr.update)  needs this data still to work properly.


Here is exception, after adding evict() in stateModified method :

Caused by: org.apache.jackrabbit.core.state.ItemStateException: Unable to resolve path for item: b0ec45fd-cf39-4ab5-bcd0-a8e95d06008f/{http://www.jcp.org/jcr/1.0}predecessors
	at org.apache.jackrabbit.core.observation.EventStateCollection.getPath(EventStateCollection.java:520)
	at org.apache.jackrabbit.core.observation.EventStateCollection.createEventStates(EventStateCollection.java:385)
	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:655)
	at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:826)
	at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:856)
	at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:324)
	at org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:313)
	at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:300)
	at org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:306)
	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1244)

> ItemManager cache is getting out of sync
> ----------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Updated: (JCR-1197) Node.restore() may throw InvalidItemStateException

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

Jukka Zitting updated JCR-1197:
-------------------------------

        Fix Version/s:     (was: 1.4)
    Affects Version/s:     (was: 1.4)

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Assignee: Tobias Bocanegra
>            Priority: Critical
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Commented: (JCR-1197) ItemManager cache is getting out of sync

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541281 ] 

Marcel Reutegger commented on JCR-1197:
---------------------------------------

Thanks for your feedback. IIRC the ItemManager is a listener on the ItemStateManager which provides the ItemStates for Items. This means it should get notifications whenever an ItemState changes.

> ItemManager cache is getting out of sync
> ----------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Commented: (JCR-1197) ItemManager cache is getting out of sync

Posted by "Przemo Pakulski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544795 ] 

Przemo Pakulski commented on JCR-1197:
--------------------------------------

There is definitely problem with modCount attribute of ItemState. During each save this attribute is incremented by SharedItemStateManager, but sometimes after restore ItemState holded by Items in ItemManager cache still has different (old) valueo modCount.

Then during next save operation exception is thrown.

> ItemManager cache is getting out of sync
> ----------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Reopened: (JCR-1197) Node.restore() may throw InvalidItemStateException

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

Tobias Bocanegra reopened JCR-1197:
-----------------------------------


change produces a lot of warning messages:

   ItemStateReferenceCache: overwriting cached entry <uuid>
(ItemStateReferenceCache.java, line 117)
   MLRUItemStateCache: overwriting cached entry <uuid>
(MLRUItemStateCache.java, line 140)
   ItemStateMap: overwriting map entry <uuid> (ItemStateMap.java, line 8

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Assignee: Tobias Bocanegra
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Commented: (JCR-1197) ItemManager cache is getting out of sync

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540452 ] 

Marcel Reutegger commented on JCR-1197:
---------------------------------------

When the versionable child node is restored it is first removed, which is IMO not needed. The following change worked for me, while all tests still pass:

Index: src/main/java/org/apache/jackrabbit/core/NodeImpl.java
===================================================================
--- src/main/java/org/apache/jackrabbit/core/NodeImpl.java	(revision 592000)
+++ src/main/java/org/apache/jackrabbit/core/NodeImpl.java	(working copy)
@@ -4010,7 +4010,7 @@
                         }
                         oldVersion = n.getBaseVersion().getName();
                     } else if (n.getParent().isSame(this)) {
-                        n.internalRemove(true);
+                        oldVersion = n.getBaseVersion().getName();
                     } else {
                         // since we delete the OPV=Copy children beforehand, all
                         // found nodes must be outside of this tree


Tobi, what do you think?

> ItemManager cache is getting out of sync
> ----------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Reopened: (JCR-1197) Node.restore() may throw InvalidItemStateException

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

Tobias Bocanegra reopened JCR-1197:
-----------------------------------


changes produce failures of jcr2spi tests. see JCR-1293.

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Assignee: Tobias Bocanegra
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Commented: (JCR-1197) ItemManager cache is getting out of sync

Posted by "Przemo Pakulski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540790 ] 

Przemo Pakulski commented on JCR-1197:
--------------------------------------

There is a lot of layers in Jackrabbit, and almost each layer has own cache. It seems that caches are not invalidated properly.
During save() method on ItemImpl transient item states are disposed from SessionItemStateManager, but it seems than ItemManager cache is not invalidated. Sometimes it works because ItemManager uses weak references, but in some cases it is causing problems like this.

To make it work I needed to put such line :

((SessionImpl)session).getItemManager().dispose();

between restore and checkout in our code. This line clears ItemManager cache completely.

> ItemManager cache is getting out of sync
> ----------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Updated: (JCR-1197) ItemManager cache is getting out of sync

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

Przemo Pakulski updated JCR-1197:
---------------------------------

    Attachment: CheckoutFailure.java

Attached simple java class that can be used to reproduce the issue.

> ItemManager cache is getting out of sync
> ----------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Updated: (JCR-1197) Node.restore() may throw InvalidItemStateException

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

Stefan Guggisberg updated JCR-1197:
-----------------------------------

    Component/s: versioning
        Summary: Node.restore() may throw InvalidItemStateException  (was: ItemManager cache is getting out of sync)

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3, 1.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Resolved: (JCR-1197) Node.restore() may throw InvalidItemStateException

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

Tobias Bocanegra resolved JCR-1197.
-----------------------------------

    Resolution: Fixed

fixed warning messages.

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Assignee: Tobias Bocanegra
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Commented: (JCR-1197) Node.restore() may throw InvalidItemStateException

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553624 ] 

Tobias Bocanegra commented on JCR-1197:
---------------------------------------

i'm able to reproduce it and will take a look at it

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3, 1.4
>            Reporter: Przemo Pakulski
>            Assignee: Tobias Bocanegra
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Commented: (JCR-1197) Node.restore() may throw InvalidItemStateException

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12555141 ] 

Tobias Bocanegra commented on JCR-1197:
---------------------------------------

the problem is in the special case of the restore operation, where an entire subnode is internally removed and recreated. this results in a change log that contains deleted and created property states with the same id.
after the shared states are persisted, the notification events update all caches correctly, but when the local item state manager updates his state, those deleted/created states are thrown out of the cache.
this causes a later reconnect to fail and the item is marked as stale.

fix: re-cache the state on a 'created' event.

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Assignee: Tobias Bocanegra
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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


[jira] Updated: (JCR-1197) Node.restore() may throw InvalidItemStateException

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

Alexander Klimetschek updated JCR-1197:
---------------------------------------

    Fix Version/s: 1.3.4

> Node.restore() may throw InvalidItemStateException
> --------------------------------------------------
>
>                 Key: JCR-1197
>                 URL: https://issues.apache.org/jira/browse/JCR-1197
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Assignee: Tobias Bocanegra
>            Priority: Critical
>             Fix For: 1.3.4, 1.4
>
>         Attachments: CheckoutFailure.java
>
>
> It seems that ItemManager cache is not maintained correctly. I'm getting InvalidItemStateException: 'propertyId' has been modified externally tryin restore/checkout versionable nodes in single thread.
> ItemState should be evicted from ItemStateManager cache when modified, it seems that status of ItemState is changed to MODIFIED, but itemState remains in the cache.

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