[jboss-jira] [JBoss JIRA] (HIBERNATE-135) Hibernate 2LC - Infinispan: Query-cache expiration depends on namedCache name

Steve Ebersole (JIRA) issues at jboss.org
Thu Nov 19 10:24:00 EST 2015


    [ https://issues.jboss.org/browse/HIBERNATE-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130902#comment-13130902 ] 

Steve Ebersole commented on HIBERNATE-135:
------------------------------------------

This is not the correct project to report Hibernate issues under. This Jira project is for reporting issues in the integration between Hibernate and WildFly. To report issues in Hibernate, please use https://hibernate.atlassian.net. Thanks.

> Hibernate 2LC - Infinispan: Query-cache expiration depends on namedCache name
> -----------------------------------------------------------------------------
>
>                 Key: HIBERNATE-135
>                 URL: https://issues.jboss.org/browse/HIBERNATE-135
>             Project: Hibernate Integration
>          Issue Type: Bug
>            Reporter: Anna Manukyan
>            Assignee: Steve Ebersole
>
> Hi,
> I'm writing arquillian tests for Infinispan as a Hibernate 2LC and during writing tests for cache expiration case, I've found out an issue which I cannot explain. 
> I'm running tests under Arquillian AS7 managed container. The tests are using external infinispan configuration (not AS7 subsystem). Here I'm defining 2 named caches, one for Hibernate entities another for query cache. 
> <namedCache name="local-query">
>         <locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
>                  lockAcquisitionTimeout="15000" useLockStriping="false"/>
>         <eviction maxEntries="10000" strategy="LRU"/>
>         <expiration lifespan="5000" maxIdle="5000" wakeUpInterval="2000" />
> </namedCache>
> <namedCache name="local-entity">
>         <locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
>                  lockAcquisitionTimeout="15000" useLockStriping="false"/>
>         <eviction maxEntries="10000" strategy="LRU"/>
>         <expiration maxIdle="5000" wakeUpInterval="2000" lifespan="5000"/>
> </namedCache>
> In the tests I'm accessing the InfinispanRegionFactory using EntityManager's SessionFactory. From here I am able to access my cache regions. When I'm looking through all available regions I can see that the data is stored in the prefixed regions, so e.g. for my app the queries and entities are stored in testable.war#hib2Lc.local-query and testable.war#hib2Lc.local-entity caches. 
> When I'm testing the expiration for "local-query" cache, i.e. I'm performing a query, I'm checking that the query is placed tothe cache. Then I'm waiting for 5 seconds (as it is set in configuration), then I'm checking the cache again and the query is still there. It is not removed from the cache, although it should be expired already.
> When I'm changing the namedCache name from "local-query" to "testable.war#hib2Lc.local-query", this time the expiration works properly so the second time check succeeds. 
> The same case works without namedCache name change for entity cache. 
> You can find the tests located here: https://github.com/andyuk1986/ispn-hibernate2lc-tests/tree/master/hibernate2lc-as7-nonclustered/src/test - the test is located here: https://github.com/andyuk1986/ispn-hibernate2lc-tests/blob/master/hibernate2lc-as7-nonclustered/src/test/java/org/infinispan/hibernate/test/secondLC/ISPNSecondLevelCacheTest.java#LC169
> I'm using infinispan-core-5.1.2.FINAL, hibernate-core-4.1.3.Final, hibernate-infinispan-4.1.3.Final.
> Thanks in advance.
> Best regards,
> Anna.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list