Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-2152

EventAware cache does not persist correctly when using the StoreEventRegistryImpl

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 2.1.10, 2.1.11, 2.2
    • None
    • Blocks: Event Cache
    • None

    Description

      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.

      Attachments

        Activity

          People

            asavory Andrew Savory
            ellispritchard Ellis Pritchard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: