Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312311 - JPA: Cache invalidation does not check existing invalidation state
Summary: JPA: Cache invalidation does not check existing invalidation state
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 312503
Blocks:
  Show dependency tree
 
Reported: 2010-05-10 13:47 EDT by Michael OBrien CLA
Modified: 2022-06-09 10:15 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael OBrien CLA 2010-05-10 13:47:59 EDT
>The following IdentityMapAccessor.invalidateClass() code can be optimized to check the invalidationState before resetting it to CACHE_KEY_INVALID=-1.

If the recurse boolean is set to true and all implementing subclasses of a particular class in the identityMap are invalidated in a single invalidateClass() call then code that references individual classes of this invalidated inheritance tree will re-invalidate the keys unnecessarily.

>The following key is already invalidated
key	HardCacheWeakIdentityMap$ReferenceCacheKey  (id=123)	
	invalidationState	-1	

>in a previous call to 
    public void invalidateClass(Class myClass, boolean recurse) {
...
            if (recurse || ((obj != null) && obj.getClass().equals(myClass))) {
                key.setInvalidationState(CacheKey.CACHE_KEY_INVALID);

>See implementor CacheImpl.evict() in bug# 248780
Comment 1 Michael OBrien CLA 2010-06-03 10:04:19 EDT
>this enhancement still occurs but is modified because of the optimization in bug# 312503
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:10:35 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:15:35 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink