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: Dangling objects when disk caching fails
Date Fri, 28 Jan 2005 22:12:22 GMT
In production, the files existed from a previous run of the application.
Then someone went and mucked with the permissions.  There were errors in
the logs indicating that JCS could not access the file.

In my test, I knew the objects were still in memory because they used a
reference counter that increased when they were new()'d and decreased
when they were finalize()'d and I made sure the garbage collector was
called and that I waited long enough for it to clean them up (if it
could).  When the file wasn't messed up the reference count went to
zero.  When it was messed up the reference count never decremented.

Thanks for looking into this and let me know if you need more
information.

-----Original Message-----
From: Aaron Smuts [mailto:asmuts@yahoo.com] 
Sent: Friday, January 28, 2005 3:31 PM
To: Turbine JCS Users List
Subject: Re: Dangling objects when disk caching fails

Did you have any errors in the logs?  

Did you change the file permissions after the cache
started up?  Typically the cache itself creates those
files, so it would have permission.  You must have
copied them from somewhere else?

How do you know the objects were still in memory? 
What you did, I guess, contrasting the broken with the
functional situation, sounds like an ok method.  

I assume that the objects never left purgatory when
the disk failed in this manner.  Perhaps the event
queue where objects in purgatory live was not cleared.
 I'll look into it.  

Aaron


--- "Wyatt, Allen" <Allen.Wyatt@travelocity.com>
wrote:

> I think I've encountered a situation where JCS keeps
> references to
> objects that it can not write to disk even though
> clients of JCS can't
> access the objects (dangling references chewing up
> memory).
> 
> In my test, I made the file used by the disk cache
> for a region unusable
> (changed its permissions so it couldn't be read from
> or written to).  I
> put several objects in the cache region and waited
> for them to be
> spooled to disk.  My test could no longer get them
> from JCS, but they
> still existed in memory.  When I changed the file
> used by the disk cache
> to being usable (readable/writable) and tried my
> test, the objects were
> removed from memory after being put to disk.
> 
> Is this a known problem?  Is there a version of JCS
> that has addressed
> it?  I guess you could say the solution is to never
> let your disk files
> become unusable, but is there a solution where the
> code can handle this
> better (not leaving dangling references to cached
> objects)?
> 


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


---------------------------------------------------------------------
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