Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-5799

Pre-modified event on invalidation cache does not contain the value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 8.0.1.Final
    • Listeners
    • None

      I have a cache listener on an invalidation-mode cache. If a cache entry gets replaced on the same node, two CacheEntryModifiedEvents are fired. The pre event returns null instead of returning the old value as it is supposed to. (The pre event correctly returned the old value in Infinispan 6, which we are upgrading from.) The post event appears to contain the correct old value, but getOldValue() is not available on CacheEntryModifiedEvent so you have to cast to EventImpl.

      11:24:02,199 INFO  [stdout] (default task-1) EventImpl{type=CACHE_ENTRY_MODIFIED, pre=true, cache=Cache 'SONGv1-localRouting'@galactica, key=1.2.3.4.5.6, value=null, oldValue=null, transaction=GlobalTransaction:<galactica>:5:local, originLocal=true, transactionSuccessful=false, entries=null, created=false}
      11:24:02,219 INFO  [stdout] (default task-1) EventImpl{type=CACHE_ENTRY_MODIFIED, pre=false, cache=Cache 'SONGv1-localRouting'@galactica, key=1.2.3.4.5.6, value=[id: 0xembedded, embedded => embedded], oldValue=[id: 0xembedded, embedded => embedded], transaction=GlobalTransaction:<galactica>:5:local, originLocal=true, transactionSuccessful=false, entries=null, created=false}
      

            Unassigned Unassigned
            rdicroce Richard DiCroce
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: