jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pablo Rios (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (JCR-314) Fine grained locking in SharedItemStateManager
Date Wed, 05 Sep 2007 18:01:36 GMT

    [ https://issues.apache.org/jira/browse/JCR-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525131
] 

prios edited comment on JCR-314 at 9/5/07 11:01 AM:
---------------------------------------------------------

It seems that during the time a versioning operation is in progress (writer) it is not possible
to establish a new session to the repository. This seems to be so because access to the root
node of the version histories (/jcr:system/jcr:versionStorage) is required to create a session
and this node is included on the active writer changelog. In other words the reader need to
access an item (root node of the version storage) that has a dependency on the active writer
changelog.

>From XAVersionManager constructor

        try {
            state = (NodeState) stateMgr.getItemState(vMgr.getHistoryRootId());
        } catch (ItemStateException e) {
            ...
        }

(An XAVersionManager is instantiated during the instantiation of an XASessionImpl)

Note: I've observed this in an XA environment.

Am I wrong or right ?

What may be the consequences of allowing a reader to get a read lock in this situation even
if the writer's changelog includes the VERSION_STORAGE_NODE_ID ?


      was (Author: prios):
    It seems that when XA transactions are used the fine grained ISM locking strategy *always*
block readers when there is a writer, because the root node of the version histories always
has a dependency on the active writer changelog.

>From XAVersionManager constructor

        try {
            state = (NodeState) stateMgr.getItemState(vMgr.getHistoryRootId());
        } catch (ItemStateException e) {
            ...
        }

Am I wrong or right ?

  
> Fine grained locking in SharedItemStateManager
> ----------------------------------------------
>
>                 Key: JCR-314
>                 URL: https://issues.apache.org/jira/browse/JCR-314
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.9, 1.0, 1.0.1, 1.1, 1.1.1, 1.2.1, 1.2.2, 1.2.3
>            Reporter: Marcel Reutegger
>         Attachments: FineGrainedISMLocking-v2.patch, FineGrainedISMLocking.patch, ISMLocking.patch,
writes-per-second.jpg
>
>
> The SharedItemStateManager (SISM) currently uses a simple read-write lock to ensure data
consistency. Store operations to the PersistenceManager (PM) are effectively serialized.
> We should think about more sophisticated locking to allow concurrent writes on the PM.
> One possible approach:
> If a transaction is currently storing data in a PM a second transaction may check if
the set of changes does not intersect with the first transaction. If that is the case it can
safely store its data in the PM.
> This fine grained locking must also be respected when reading from the SISM. A read request
for an item that is currently being stored must be blocked until the store is finished.

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


Mime
View raw message