[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7250) Bug in SharedCache handling of Natural-id
Guenther Demetz (JIRA)
noreply at atlassian.com
Mon Apr 16 10:18:51 EDT 2012
Bug in SharedCache handling of Natural-id
-----------------------------------------
Key: HHH-7250
URL: https://hibernate.onjira.com/browse/HHH-7250
Project: Hibernate ORM
Issue Type: Bug
Components: caching (L2), core
Affects Versions: 4.1.2, 4.1.0
Environment: EHCache as shared cache implementation, using read-write strategy
Reporter: Guenther Demetz
Although configuring org.hibernate.cache.LookupNaturalId cache region large enough and eternal, I always have Warning messages like following:
{noformat}
15:47:27,999 WARN AbstractReadWriteEhcacheAccessStrategy:182 - HHH020008: Cache[hibernate.test.org.hibernate.cache.LookupNaturalId] Key[P##NaturalId[ud1C9grNWA]] Lockable[(null)]
A soft-locked cache entry was expired by the underlying Ehcache. If this happens regularly you should consider increasing the cache timeouts and/or capacity limits
15:47:27,999 WARN AbstractReadWriteEhcacheAccessStrategy:182 - HHH020008: Cache[hibernate.test.org.hibernate.cache.LookupNaturalId] Key[P##NaturalId[ud1C9grNWA]] Lockable[Lock Source-UUID:9ea7be15-29d2-432f-ba0b-961392e0c995 Lock-ID:2]
A soft-locked cache entry was expired by the underlying Ehcache. If this happens regularly you should consider increasing the cache timeouts and/or capacity limits
{noformat}
Debugging into hibernate, I detected that strangely at certain point in StatefulPersistenceContext.java
method RegionAccessStrategy#unlockRegion ist called, without ever calling lockRegion.
This unlockRegion call (in EHCache it clears the entire region!) has no sense here,
with evidency the removal of previousCacheKey item was intended here indeed.
Please see the pullrequest, it makes the warnings above dissappear.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list