]
William Burns commented on ISPN-5664:
-------------------------------------
I took a look at the original case and they were also using getWithMetadata which gave me
the idea to tweak the test to use that as well. However I added assertions for everything
and noticed that the metadata doesn't seem to have the correct value. I added asserts
to verify the metadata is the proper number and it seems the entry was inserted with 100
milliseconds instead of seconds, which could cause a premature expiration.
Null is returned for a not expired entry in Hot Rod client
----------------------------------------------------------
Key: ISPN-5664
URL:
https://issues.jboss.org/browse/ISPN-5664
Project: Infinispan
Issue Type: Bug
Components: Remote Protocols
Affects Versions: 8.0.0.Beta2
Reporter: William Burns
Assignee: William Burns
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.