3 Replies Latest reply on Sep 8, 2015 2:16 PM by frigorn

    CacheEntryRemovedEvent.getOldValue()

    frigorn Newbie

      Hi,

       

      According to the JavaDoc CacheEntryRemovedEvent.getOldValue() should always return you a value.

       

      While testing with 7.2.3 we have seen cases where getOldValue() returns null. Should I raise a bug?

       

      Frigorn

        • 1. Re: CacheEntryRemovedEvent.getOldValue()
          William Burns Expert

          I know that Paul Ferraro mentioned this on IRC a while back.  However he wasn't able to produce a case or trace when it occurred.  It seems like a bug to me though, do you have a test case to reproduce this or a trace of it occurring?  With those we should be able to remedy the issue for you guys.

           

          Thanks!

          • 2. Re: CacheEntryRemovedEvent.getOldValue()
            Radim Vansa Master

            It would be very helpful if you could provide:

            a) event.toString() (so that we can see if it was pre- or post-event etc.)

            b) your cache configuration

            c) are you using any flags when accessing the cache?

            • 3. Re: CacheEntryRemovedEvent.getOldValue()
              frigorn Newbie

              I don't have a specific scenario where it happens but we see it from time to time while removing entries from a replicated cache.

              It happens on a post-event.

               

              Here's the cache configuration that we are using :

               

              <infinispan
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="urn:infinispan:config:7.0 http://www.infinispan.org/schemas/infinispan-config-7.0.xsd"
                      xmlns="urn:infinispan:config:7.0">

                  <jgroups>
                      <stack-file name="external-file" path="jgroups.xml"/>
                  </jgroups>

                  <cache-container default-cache="">
                      <transport stack="external-file" />
                      <distributed-cache name="session" mode="ASYNC" owners="2">
                      </distributed-cache>
                      <replicated-cache name="global" mode="ASYNC">
                      </replicated-cache>
                  </cache-container>
              </infinispan>

               

              We do not use any specific flags when accessing the cache.

               

              In our testing, we run two instances of the application on the same machine.