cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COCOON-2146) Using EventAware cache implementation breaks persistent cache restore on restart
Date Tue, 27 Nov 2007 18:51:43 GMT

    [ https://issues.apache.org/jira/browse/COCOON-2146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545962
] 

Ard Schrijvers commented on COCOON-2146:
----------------------------------------

Hmmmm, I am really confident that persistent caches with the event registry used to work (we
have used it for years until i disabled it...but the last time i used it was with 2.1.8, so
not sure if something changed :-) ). A restart did use to work. You are really sure that you
have a restart persistent cache configuration? 

"I've tracked this down to the fact that AbstractDoubleMapEventRepository#dispose() which
performs the persist(), then immediately clear()s the maps, WHICH HAVEN'T YET BEEN WRITTEN
TO DISK BY EHCACHE SHUTDOWN! " 

This shouldn't matter. When the registry is persisted, you can clear the double maps. The
cache takes care of persisting itself. Can you comment your <store> configuration of
your ehcache?

Can you confirm, that on disk, in your work dir after shutdown, you have serialized ehcache
files? Can you also confirm you have (i think in the WEB-INF dir somewhere) serialized .ser
registry files. Open them with notepad to see that they contain some data if you want....

At startup, I know that for every entry in the registry, the cachekey is checked wether it
is still present in the cache. When not, the registry of this cachekey is discarded. I think
you have a problem somewhere in this (though depends on wether your .ser files are empty or
not...if empty, the problem is ofcourse in the shutdown)



> Using EventAware cache implementation breaks persistent cache restore on restart
> --------------------------------------------------------------------------------
>
>                 Key: COCOON-2146
>                 URL: https://issues.apache.org/jira/browse/COCOON-2146
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: Event Cache
>    Affects Versions: 2.1.10
>            Reporter: Ellis Pritchard
>            Assignee: Jörg Heinicke
>            Priority: Minor
>             Fix For: 2.1.11-dev (Current SVN)
>
>         Attachments: patch.txt
>
>
> In revision 412307 (Cocoon 2.1.10), AbstractDoubleMapEventRegistry and EventRegistryDataWrapper
were changed (without an informative SVN comment!) to use the commons MultiValueMap instead
of the MultiHashMap; I presume this was done in good faith because the latter map is deprecated
and will be removed from Apache commons-collections 4.0
> However, as a result, the persistent cache cannot be restored if the EventAware cache
implementation is used, since MultiValueMap is not Serializable! The old MultiHashMap was...
> Depending on whether StoreEventRegistryImpl or DefaultEventRegistryImpl is used, either
the event cache index is never written (ehcache doesn't store non-serializable objects on
disk), or a java.io.NotSerializableException is thrown (and caught, causing a full cache-clear)
when attempting to restore the event cache index.
> This is Major for us, since we use Event-based caching alot, and this is causing the
*entire* cache to no-longer persist across restarts (it's been like that for 8 months, since
I upgraded Cocoon to 2.1.10 in the last week I was working here, and now I'm back, they've
actually noticed!!)
> Work-around at the moment is to down-grade AbstractDoubleMapEventRegistry and EventRegistryDataWrapper
to the 2.1.9 versions (pre-412307), which works so long as Apache-commons 3.x is still in
use.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message