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

Julian Reschke commented on JCR-2950:
-------------------------------------

Ok, I just got

-------------------------------------------------------------------------------
Test set: org.apache.jackrabbit.core.security.authorization.acl.TestAll
-------------------------------------------------------------------------------
Tests run: 157, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 12.355 sec 
<<< FAILURE!
testCacheUnderLoad(org.apache.jackrabbit.core.security.authorization.acl.EntryCollectorTest)
  Time elapsed: 0.172 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<1> but was:<0>
        at junit.framework.Assert.fail(Assert.java:50)
        at junit.framework.Assert.failNotEquals(Assert.java:287)
        at junit.framework.Assert.assertEquals(Assert.java:67)
        at junit.framework.Assert.assertEquals(Assert.java:199)
        at junit.framework.Assert.assertEquals(Assert.java:205)
        at 
org.apache.jackrabbit.core.security.authorization.acl.EntryCollectorTest.verifyACEs(EntryCollectorTest.java:159)
        at 
org.apache.jackrabbit.core.security.authorization.acl.EntryCollectorTest.testCache(EntryCollectorTest.java:197)
        at 
org.apache.jackrabbit.core.security.authorization.acl.EntryCollectorTest$1.runTest(EntryCollectorTest.java:401)
        at 
org.apache.jackrabbit.core.security.authorization.acl.EntryCollectorTest.runTestUnderLoad(EntryCollectorTest.java:384)
        at 
org.apache.jackrabbit.core.security.authorization.acl.EntryCollectorTest.testCacheUnderLoad(EntryCollectorTest.java:399)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at 
org.apache.jackrabbit.test.AbstractJCRTest.run(AbstractJCRTest.java:456)
        at junit.framework.TestSuite.runTest(TestSuite.java:243)
        at junit.framework.TestSuite.run(TestSuite.java:238)
        at junit.framework.TestSuite.runTest(TestSuite.java:243)
        at 
org.apache.jackrabbit.test.ConcurrentTestSuite.access$001(ConcurrentTestSuite.java:29)
        at 
org.apache.jackrabbit.test.ConcurrentTestSuite$2.run(ConcurrentTestSuite.java:67)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown 
Source)
        at java.lang.Thread.run(Thread.java:662)

with the patch in place. This seems to apply that in presence of the patch, the 
invalidation of the ACL cache might not work correctly when there are 
concurrent read operations.
                
> CachingEntryCollector ineffective if number of accessed policies exceeds 
> cache size
> -----------------------------------------------------------------------------------
>
>                 Key: JCR-2950
>                 URL: https://issues.apache.org/jira/browse/JCR-2950
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-core, security
>    Affects Versions: 2.2.12, 2.4.2, 2.6
>         Environment: Repository with ACEs > 1000
>            Reporter: Honwai Wong
>            Assignee: angela
>         Attachments: CachingEntryCollector.ConcurrentCache-trunk.patch, 
> JCR-2950-refactor+rootnode.patch, JCR-2950-refactor+rootnode_2.patch , 
> JCR-2950-refactor+rootnode_3.patch, JCR-2950-refactor+rootnode_4.patch, 
> JCR-2950-refactor+rootnode_5.patch, JCR-2950-refactor+rootnode_6.patch, 
> JCR-2950-refactor+rootnode_7.patch, JCR-2950-refactor.patch
>
>
> The CachingEntryCollector's cache (LRUMap, max size: 1000) seems to become 
> ineffective in case there are more than 1000 ACEs present in the repository. 
> Since access to the cache is synchronized, many threads are basically 
> blocked, waiting to get access to the cache.
> Java callstack:
> at 
> org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.getEntries(CachingEntryCollector.java:99(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/security/authorization/acl/EntryCollector.collectEntries(EntryCollector.java:134(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/security/authorization/acl/CompiledPermissionsImpl.canRead(CompiledPermissionsImpl.java:250(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/security/DefaultAccessManager.canRead(DefaultAccessManager.java:251(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/ItemManager.canRead(ItemManager.java:426(Compiled 
> Code))
> at 
> org/apache/jackrabbit/core/ItemManager.createItemData(ItemManager.java(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/ItemManager.getItemData(ItemManager.java:379(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/ItemManager.itemExists(ItemManager.java:292(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/ItemManager.itemExists(ItemManager.java:464(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/session/SessionItemOperation$1.perform(SessionItemOperation.java:49(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/session/SessionItemOperation$1.perform(SessionItemOperation.java:46(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/session/SessionItemOperation.perform(SessionItemOperation.java:187(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/session/SessionState.perform(SessionState.java:200(Compiled
>  Code))
> at 
> org/apache/jackrabbit/core/SessionImpl.perform(SessionImpl.java:355(Compiled 
> Code))
> at 
> org/apache/jackrabbit/core/SessionImpl.itemExists(SessionImpl.java:751(Compiled
>  Code))

--
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

        

Reply via email to