jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3257) ItemManager cache access tweaks
Date Wed, 14 Mar 2012 09:47:38 GMT

    [ https://issues.apache.org/jira/browse/JCR-3257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229105#comment-13229105

Stefan Guggisberg commented on JCR-3257:

ItemManager is at the very core of jackrabbit. unless there's a real issue i'd rather not
touch it. 
> ItemManager cache access tweaks
> -------------------------------
>                 Key: JCR-3257
>                 URL: https://issues.apache.org/jira/browse/JCR-3257
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-core
>            Reporter: Alex Parvulescu
>         Attachments: JCR-3257.patch
> I started with #evictItem but I ended up doing some more tiny changes overall:
>  - #evictItem: we can safely refactor the #get -> #remove into a simple #remove:
> It appears that the check "cached == data" only applies to shareable nodes. I ran the
entire jacorabbit-core test suite and the check failed 9 times, out of which 3 were related
to shareable nodes and the other 6 were just comparing to null, in which case we can safely
evict the value.
> So if we refactor the method to be consistent with #cacheItem, we can safely remove the
"==" check. The shareableNodesCache has the shareable nodes info, itemCache everything else.
> - #cacheItem doesn't need to check if the key exists, #put already returns the info
> - #itemDestroyed does not need to synchronize on itemCache as #evictItems already does
> - ShareableNodesCache#evictAll doesn't need to be synchronized - that is already covered
by #evictItems with the synchronization on itemCache
> patch follows shortly

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message