You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2010/03/05 15:36:27 UTC
[jira] Created: (JCR-2546) SISM blocks the item state cache when
loading a new item
SISM blocks the item state cache when loading a new item
--------------------------------------------------------
Key: JCR-2546
URL: https://issues.apache.org/jira/browse/JCR-2546
Project: Jackrabbit Content Repository
Issue Type: Improvement
Components: jackrabbit-core
Reporter: Jukka Zitting
The SharedItemStateManager.getNonVirtualItemState() method contains a loadItemState() call within a "synchronized (cache)" block. This prevents all item state cache access while a new item is being loaded from the persistence manager. I have at least one case where this has caused a serious performance drop, essentially synchronizing repository access for all readers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-2546) SISM blocks the item state cache when
loading a new item
Posted by "Tom Quellenberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tom Quellenberg updated JCR-2546:
---------------------------------
Attachment: JCR-2546_1.6.txt
Please find attached a patch for the 1.6 branch
> SISM blocks the item state cache when loading a new item
> --------------------------------------------------------
>
> Key: JCR-2546
> URL: https://issues.apache.org/jira/browse/JCR-2546
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Fix For: 2.1.0
>
> Attachments: JCR-2546_1.6.txt
>
>
> The SharedItemStateManager.getNonVirtualItemState() method contains a loadItemState() call within a "synchronized (cache)" block. This prevents all item state cache access while a new item is being loaded from the persistence manager. I have at least one case where this has caused a serious performance drop, essentially synchronizing repository access for all readers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (JCR-2546) SISM blocks the item state cache when
loading a new item
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting reopened JCR-2546:
--------------------------------
Marcel and Thomas noted that moving the synchronization from the cache to the SISM instance may just relocate the problem. I think that this decoupling between itemExists() and getItem() should still help, but will set up a test case to verify the actual gains.
> SISM blocks the item state cache when loading a new item
> --------------------------------------------------------
>
> Key: JCR-2546
> URL: https://issues.apache.org/jira/browse/JCR-2546
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Fix For: 2.1.0
>
>
> The SharedItemStateManager.getNonVirtualItemState() method contains a loadItemState() call within a "synchronized (cache)" block. This prevents all item state cache access while a new item is being loaded from the persistence manager. I have at least one case where this has caused a serious performance drop, essentially synchronizing repository access for all readers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-2546) SISM blocks the item state cache when
loading a new item
Posted by "nihongye (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882932#action_12882932 ]
nihongye commented on JCR-2546:
-------------------------------
ItemStateReferenceCache is thread safe,for JMM happen-before rule:
// put it in cache
cache.cache(state);
// set parent container
state.setContainer(this);
the statments must be revert:
state.setContainer(this);
cache.cache(state);
> SISM blocks the item state cache when loading a new item
> --------------------------------------------------------
>
> Key: JCR-2546
> URL: https://issues.apache.org/jira/browse/JCR-2546
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Fix For: 2.1.0
>
>
> The SharedItemStateManager.getNonVirtualItemState() method contains a loadItemState() call within a "synchronized (cache)" block. This prevents all item state cache access while a new item is being loaded from the persistence manager. I have at least one case where this has caused a serious performance drop, essentially synchronizing repository access for all readers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (JCR-2546) SISM blocks the item state cache when
loading a new item
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting resolved JCR-2546.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.1.0
Assignee: Jukka Zitting
Fixed in revision 919458.
> SISM blocks the item state cache when loading a new item
> --------------------------------------------------------
>
> Key: JCR-2546
> URL: https://issues.apache.org/jira/browse/JCR-2546
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Fix For: 2.1.0
>
>
> The SharedItemStateManager.getNonVirtualItemState() method contains a loadItemState() call within a "synchronized (cache)" block. This prevents all item state cache access while a new item is being loaded from the persistence manager. I have at least one case where this has caused a serious performance drop, essentially synchronizing repository access for all readers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (JCR-2546) SISM blocks the item state cache when
loading a new item
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting resolved JCR-2546.
--------------------------------
Resolution: Fixed
In revision 929506 I narrowed down the synchronization in getNonVirtualItemState to only cover the loading of new items in cases where a cache miss has occurred. Concurrent threads will now be able to continue accessing items in the cache while new items
are being loaded from the persistence manager.
> SISM blocks the item state cache when loading a new item
> --------------------------------------------------------
>
> Key: JCR-2546
> URL: https://issues.apache.org/jira/browse/JCR-2546
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Fix For: 2.1.0
>
>
> The SharedItemStateManager.getNonVirtualItemState() method contains a loadItemState() call within a "synchronized (cache)" block. This prevents all item state cache access while a new item is being loaded from the persistence manager. I have at least one case where this has caused a serious performance drop, essentially synchronizing repository access for all readers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-2546) SISM blocks the item state cache when
loading a new item
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated JCR-2546:
-------------------------------
Fix Version/s: 1.6.4
Thanks! I committed the patch to the 1.6 branch in revision 1005043.
> SISM blocks the item state cache when loading a new item
> --------------------------------------------------------
>
> Key: JCR-2546
> URL: https://issues.apache.org/jira/browse/JCR-2546
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Fix For: 1.6.4, 2.1.0
>
> Attachments: JCR-2546_1.6.txt
>
>
> The SharedItemStateManager.getNonVirtualItemState() method contains a loadItemState() call within a "synchronized (cache)" block. This prevents all item state cache access while a new item is being loaded from the persistence manager. I have at least one case where this has caused a serious performance drop, essentially synchronizing repository access for all readers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-2546) SISM blocks the item state cache when
loading a new item
Posted by "Andrey Adamovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842525#action_12842525 ]
Andrey Adamovich commented on JCR-2546:
---------------------------------------
+1 we experienced this problem as well
> SISM blocks the item state cache when loading a new item
> --------------------------------------------------------
>
> Key: JCR-2546
> URL: https://issues.apache.org/jira/browse/JCR-2546
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Fix For: 2.1.0
>
>
> The SharedItemStateManager.getNonVirtualItemState() method contains a loadItemState() call within a "synchronized (cache)" block. This prevents all item state cache access while a new item is being loaded from the persistence manager. I have at least one case where this has caused a serious performance drop, essentially synchronizing repository access for all readers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.