You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2005/07/07 17:04:10 UTC

[jira] Closed: (JCR-164) SharedItemStateManager not properly synchronized

     [ http://issues.apache.org/jira/browse/JCR-164?page=all ]
     
Marcel Reutegger closed JCR-164:
--------------------------------


> SharedItemStateManager not properly synchronized
> ------------------------------------------------
>
>          Key: JCR-164
>          URL: http://issues.apache.org/jira/browse/JCR-164
>      Project: Jackrabbit
>         Type: Bug
>   Components: core
>  Environment: svn revision: 209448
>     Reporter: Marcel Reutegger
>     Assignee: Marcel Reutegger
>      Fix For: 1.0
>  Attachments: SharedItemStateManager.patch
>
> Some time ago we removed synchronized modifiers from the methods store() hasItemState() and getItemState(). While some care has been taken to ensure the cache integrity, I think the contract for the SharedItemStateManager (SISM) is now broken. The JavaDoc does not clearly document this, but I think all relevant methods of the SISM working on ItemStates should be atomic.
> E.g. a call to hasItemState() should not return true for an ItemState that another thread is currently adding in store(). Similarly a getItemState() should not return an ItemState that is currenly added or modified in a store() operation.
> Currently I see two options:
> - Change the methods to synchronized again. This will actually serialize all calls to the SISM.
> - Implement a more sophisticated synchronisation. E.g. multiple store operations can still be allowed, as long as their ChangeLogs do not intersect. Retrieving ItemStates might still be allowed while a ChangeLog is stored, as long as the ItemState to retrieve is not part of the ChangeLog.
> Comments and suggestions are very welcome.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira