Bug 1243671 - Null is returned for a not expired entry in Hot Rod client
Summary: Null is returned for a not expired entry in Hot Rod client
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER1
: 6.5.1
Assignee: William Burns
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks: 1253052
TreeView+ depends on / blocked
 
Reported: 2015-07-16 05:22 UTC by Osamu Nagano
Modified: 2025-02-10 03:47 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
: 1253052 (view as bug list)
Environment:
Last Closed: 2025-02-10 03:47:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
expiration-test.zip (4.19 KB, application/zip)
2015-07-16 05:22 UTC, Osamu Nagano
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-5664 0 Major Resolved Null is returned for a not expired entry in Hot Rod client 2018-08-28 07:27:11 UTC

Description Osamu Nagano 2015-07-16 05:22:50 UTC
Created attachment 1052542 [details]
expiration-test.zip

Description of problem:
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.


Steps to Reproduce:
1. Start a standalone JDG server.
2. Run the attached reproducer.
~~~
$ unzip expiration-test.zip
$ cd expiration-test
$ mvn compile dependency:copy-dependencies
$ java -cp 'target/dependency/*:target/classes' \
       -Djava.util.logging.manager=org.jboss.logmanager.LogManager \
       -Dlogging.configuration=file:logging.properties \
       com.example.App
~~~

Comment 5 Red Hat Bugzilla 2025-02-10 03:47:53 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


Note You need to log in before you can comment on or make changes to this bug.