cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject RE: Persistent storing should work now
Date Wed, 19 May 2004 11:29:10 GMT
Upayavira wrote:
> Carsten Ziegeler wrote:
> >Due to our change to JCS I found a serious bug in our own 
> caching keys: 
> >the hash code wasn't always calculated properly :( This resulted in
> >
> >a) an unusable persistent store as after an application restart the 
> >keys didn't match anymore
> >
> >and
> >
> >b) other environments like CLI etc. couldn't use the cache at all.
> >  
> >
> Great work Carsten.
> Can you explain why other environments couldn't use the 
> cache? I'm sure I've seen stuff go in and out of the cache 
> within the CLI (but only within a single session).
The hash-code calculation of our keys was based on the hash code
of some strings used inside the keys. All these hash code were
added to build the hash code for our key. Somehow this seems
to produce an integer overflow/miss-interpretation. So, after
an application start the hash code wasn't the same as when the
objects were stored.
Therefore the hash code didn't match the newly created hash
code of the new keys and nothing could be found in the store
although it wasn't empty.

I haven't tested it with the CLI, but I don't see any reason why
it shouldn't work :)


View raw message