jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Przemo Pakulski (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1197) ItemManager cache is getting out of sync
Date Fri, 09 Nov 2007 11:29:50 GMT

    [ 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) {
+            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
> 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.

View raw message