[infinispan-issues] [JBoss JIRA] (ISPN-9717) HotRod Server incorrectly handles a larger value than 2147843 as -1 for lifespan / maxIdle
Tristan Tarrant (Jira)
issues at jboss.org
Wed Nov 14 02:54:00 EST 2018
[ https://issues.jboss.org/browse/ISPN-9717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tristan Tarrant updated ISPN-9717:
----------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/6402, https://github.com/infinispan/infinispan/pull/6403 (was: https://github.com/infinispan/infinispan/pull/6402)
> HotRod Server incorrectly handles a larger value than 2147843 as -1 for lifespan / maxIdle
> ------------------------------------------------------------------------------------------
>
> Key: ISPN-9717
> URL: https://issues.jboss.org/browse/ISPN-9717
> Project: Infinispan
> Issue Type: Bug
> Components: Hot Rod, Server
> Affects Versions: 9.4.1.Final
> Reporter: Masafumi Miura
> Priority: Major
> Fix For: 10.0.0.Alpha1, 9.4.2.Final
>
> Attachments: remote-example-ISPN-9717.zip
>
>
> HotRod Server incorrectly handles a larger value than 2147843 seconds as -1 for lifespan / maxIdle.
> - example Hot Rod client code:
> {code}
> // long lifespan = 2147483L; // OK
> long lifespan = 2147484L; // incorrectly treated as -1
> // long lifespan = 2147483647L; // Integer.MAX_VALUE
> long maxIdle = lifespan;
> System.out.printf("Execute put() new entry \"%s=%s\" with lifespan=%s, maxIdle=%s\n", key, val, lifespan, maxIdle);
> cache.put(key, val, lifespan, TimeUnit.SECONDS, maxIdle, TimeUnit.SECONDS);
> System.out.printf("New entry created : %s = %s\n", key, cache.get(key));
> MetadataValue metadata = cache.getWithMetadata(key);
> System.out.printf("New entry metadata: lifespan=%s, maxIlde=%s, lastUsed=%s, created=%s\n", metadata.getLifespan(), metadata.getMaxIdle(), metadata.getLastUsed(), SDF.format(new Date(metadata.getCreated())));
> {code}
> - example logging output
> {code}
> Execute put() new entry "key=value" with lifespan=2147484, maxIdle=2147484
> New entry created : key = value
> New entry metadata: lifespan=-1, maxIlde=-1, lastUsed=-1, created=1970-01-01 08:59:59 999
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the infinispan-issues
mailing list