jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wyatt, Allen" <Allen.Wy...@travelocity.com>
Subject RE: Excessive number of JCS objects in memory
Date Thu, 03 Feb 2005 00:14:57 GMT
I may have discovered what is causing a leak of ReadWriteLock and
RwLockHolder objects (both in package org.apache.jcs.utils.locking).

Each cache region that uses an auxiliary disk cache has its own
IndexedDiskCache.  Each AbstractDiskCache (from which we get
IndexedDiskCache) has its own ReadWriteLockManager to manage locking
stuff.  Each ReadWriteLockManager has its own locks Hashtable keyed by
String ids with RwLockHolder values.  All ReadWriteLockManagers share
one RwLockGC (it's a static member of ReadWriteLockManager) to clean up
locks.  The RwLockGC gets created once with a reference to one
ReadWriteLockManager's locks Hashtable.  If I'm looking at this
correctly, that means the other ReadWriteLockManagers' locks Hashtables
are not under the control of the RwLockGC cleaner thread and so the
RwLockHolders (which hold ReadWriteLocks) in those locks Hashtables
never get cleaned up.

Does this look right?  If so, how would we fix this?  Would it be
possible to have all ReadWriteLockManagers share one locks Hashtable?

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org


Mime
View raw message