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

Null is returned for a not expired entry in Hot Rod client

    Details

      Description

      For a mortal entry (lifespan > -1), overwriting it with lifespan=-1 (make it immortal) unexpectedly removes the entry like follows.

      ~~~
      cache.put(key, "value1", 100, TimeUnit.SECONDS, 100, TimeUnit.SECONDS);
      cache.get(key); // returns "value1"
      cache.put(key, "value2", -1, TimeUnit.SECONDS, 100, TimeUnit.SECONDS);
      cache.get(key); // returns null, expected "value2"
      cache.put(key, "value3", -1, TimeUnit.SECONDS, 100, TimeUnit.SECONDS);
      cache.get(key); // returns "value3"
      ~~~

      In library mode, the 2nd get returns non-null as expected. The same behaviour is observed for a transient (maxIdle > -1) entry also.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                william.burns Will Burns
                Reporter:
                william.burns Will Burns
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: