[
https://issues.apache.org/jira/browse/COCOON-2152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604015#action_12604015
]
Ellis Pritchard commented on COCOON-2152:
-----------------------------------------
IMHO this needs a complete re-factor for 2.2.
a) It works as a pipeline impl, which means that you have to ensure, when using
event-based caching, that all super-pipelines are also 'eventaware', else cache
entries get stuck in the higher-level caching pipelines, due to EventValidity
on its own acting as a NOOP validity. Prone to user errors.
b) there's no way for the event registry to pick up cache implementation based
removals, e.g. when ehcache expires an entry for any reason.
This functionality should either be built into the core (hmm, er, no) or, much
better, implemented as an aspect, which can be applied to the standard caching
pipeline.
Yes, we could port the 2.1.x code to 2.2, but it would suck.
Maybe I'll get around to it in July... but feel free to beat me to it!
> EventAware cache does not persist correctly when using the
> StoreEventRegistryImpl
> ---------------------------------------------------------------------------------
>
> Key: COCOON-2152
> URL: https://issues.apache.org/jira/browse/COCOON-2152
> Project: Cocoon
> Issue Type: Bug
> Components: Blocks: Event Cache
> Affects Versions: 2.1.10, 2.1.11, 2.2
> Reporter: Ellis Pritchard
> Assignee: Andrew Savory
> Fix For: 2.1.12-dev (Current SVN)
>
>
> When using the DefaultEventRegistryImpl the functionality now works as
> expected (events are persisted and restored) after the patch applied in
> COCOON-2146.
> However, there's still a problem with StoreEventRegistryImpl.
> The behaviour is that it doesn't seem to actually write/restore any event
> entries: the maps in the EventRegistryDataWrapper are empty (but not null)
> after restart, even though the actual cache entry (key EVENTREGWRAPPER) was
> found in the Store, and the entries were present when persist() was called.
> The effect of this is to correctly restore the cached entries, but discard
> all the events, which means that event-flushes don't work any more, which is
> not a good thing.
> 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 code has probably never worked :)
> Patches to follow; I propose modifying dispose() to null the map fields, but
> not perform clear() on them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.