[
https://issues.apache.org/jira/browse/JCR-862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494228
]
Marcel Reutegger commented on JCR-862:
--------------------------------------
Are you sure, this is exactly what shouldn't happen anymore because we moved
the synchronization from the ItemManager instance to the cache map. E.g.:
/**
@@ -622,11 +628,13 @@
*
* @param id id of the item to remove from the cache
*/
- private synchronized void evictItem(ItemId id) {
+ private void evictItem(ItemId id) {
if (log.isDebugEnabled()) {
log.debug("removing item " + id + " from cache");
}
- itemCache.remove(id);
+ synchronized (itemCache) {
+ itemCache.remove(id);
+ }
}
Do you have a thread dump that shows the deadlock?
> unsynchronized access on 'itemCache' map in ItemManager
> --------------------------------------------------------
>
> Key: JCR-862
> URL: https://issues.apache.org/jira/browse/JCR-862
> Project: Jackrabbit
> Issue Type: Bug
> Components: core
> Affects Versions: 1.2.3
> Reporter: Tobias Bocanegra
> Assigned To: Stefan Guggisberg
> Fix For: 1.4
>
> Attachments: ItemManager.patch, stacktrace.txt
>
>
> the access 'itemCache' map in ItemManager is mostly synchronized by not via
> the ItemStateListener methods:
> [...]
> public void stateCreated(ItemState created) {
> ItemImpl item = retrieveItem(created.getId());
> if (item != null) {
> item.stateCreated(created);
> }
> }
> [...]
> private ItemImpl retrieveItem(ItemId id) {
> return (ItemImpl) itemCache.get(id);
> }
> [...]
> this can result in a corruption of a map (eg subsequent accesses may result
> in a endless loop).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.