[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4080) Distributed QueryCache does not evict

Keith Mashinter (JIRA) noreply at atlassian.com
Tue Sep 1 15:46:15 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33881#action_33881 ] 

Keith Mashinter commented on HHH-4080:
--------------------------------------

I had a similar issue and found it was a limitation in ehcache which was reported fixed in ehcache-1.6, along with many Java5 performance improvements.

I'm not sure if this is your exact issue, but try this for your ehcache-1.6 clustered caches, noting the new replicatePutsViaCopy=false that I recommended in addition to the replicateUpdatesViaCopy=false.

		<cacheEventListenerFactory
			class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
			properties="replicateAsynchronously=true, asynchronousReplicationIntervalMillis=500,
				replicatePutsViaCopy=false, replicateUpdatesViaCopy=false, replicatePuts=true, replicateUpdates=true, replicateRemovals=true"/>



> Distributed QueryCache does not evict 
> --------------------------------------
>
>                 Key: HHH-4080
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4080
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: caching (L2)
>    Affects Versions: 3.3.1, 3.3.2
>         Environment: Hibernate 3.3.1/2  + ehcache1.5& 1.6, multiple Tomcats 
>            Reporter: andreas bester
>
> This is essentially  the exact same issue described in http://opensource.atlassian.com/projects/hibernate/browse/HHH-3734
> further to this : https://forum.hibernate.org/viewtopic.php?t=979125&highlight=querycache
> Except It's a bug and not really an enhancement as it stops you from using Distributed QueryCache when using Invalidation.
> I am more than willing to test any patches. or provide more information.
> Details:
> -App1 (user facing website) 
> -App2 (cms) 
> 1. App1 calls: StandardQueryCache.cacheRegion.put() placing an HQL query in cache referencing table "A" 
> 2. App2 makes an update to the entity representing table "A" 
> 3. EHCache on App2 broadcasts an "UPDATE" message to update the UpdateTimestampsCache for table "A" 
> 4. App1 receives the "UPDATE" message from App2 but ignores it because the UpdateTimestampsCache for App1 does not contain an entry for table "A" 
> 5. App1 holds onto it's originally cached value and does not reflect the update that has taken place 
> Basically, the user facing application is not receiving CMS updates for HQL queries when distributed. This is because the QueryCache API does not pass the Set of "spaces" and the StandardQueryCache does not populate the UpdateTimestampsCache with an initial entry when an HQL query is cached. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list