[jboss-jira] [JBoss JIRA] (HIBERNATE-135) Hibernate 2LC - Infinispan: Query-cache expiration depends on namedCache name
Anna Manukyan (JIRA)
jira-events at lists.jboss.org
Tue Jul 31 08:20:07 EDT 2012
Anna Manukyan created HIBERNATE-135:
---------------------------------------
Summary: 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list