[JBoss JIRA] (ISPN-5664) Null is returned for a not expired entry in Hot Rod client
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5664?page=com.atlassian.jira.plugin.... ]
William Burns commented on ISPN-5664:
-------------------------------------
Okay looking closer, I think I see the issue. If you pass a -1 for lifespan or maxIdle, it will use the default value defined for that cache. Thus if you have a low default value this value will be removed from the cache.
It seems that the server is treating -1 the same as 0. So we need to differentiate those.
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5664) Null is returned for a not expired entry in Hot Rod client
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5664?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-5664:
--------------------------------
Comment: was deleted
(was: Actually the latter is fine, I didn't realize the MetadataValue returns the lifespane and maxIdle in seconds instead of milliseconds. However now that I have fixed that I can see in the test that for some reason... a lifespan of 3 seconds is applied to the entry when a lifespan value of -1 is provided.)
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5664) Null is returned for a not expired entry in Hot Rod client
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5664?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-5664:
--------------------------------
Comment: was deleted
(was: -Interestingly I am getting different results as I am seeing a null returned from the first put instead. I will dig deeper.-
Above was caused due to the fact that flags are cleared after invocation, which is totally different than embedded mode. With that fixed I am unable to reproduce this issue on the master branch.)
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5664) Null is returned for a not expired entry in Hot Rod client
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5664?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-5664:
--------------------------------
Comment: was deleted
(was: 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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5664) Null is returned for a not expired entry in Hot Rod client
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5664?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-5664:
--------------------------------
Comment: was deleted
(was: It seems the default metadata has a lifespan of 3 seconds and is applied to the metadata. I don't quite see how there is a default of 3 seconds for the lifespan though, looking.)
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5664) Null is returned for a not expired entry in Hot Rod client
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5664?page=com.atlassian.jira.plugin.... ]
William Burns commented on ISPN-5664:
-------------------------------------
It seems the default metadata has a lifespan of 3 seconds and is applied to the metadata. I don't quite see how there is a default of 3 seconds for the lifespan though, looking.
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5664) Null is returned for a not expired entry in Hot Rod client
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5664?page=com.atlassian.jira.plugin.... ]
William Burns edited comment on ISPN-5664 at 8/10/15 12:02 PM:
---------------------------------------------------------------
Actually the latter is fine, I didn't realize the MetadataValue returns the lifespane and maxIdle in seconds instead of milliseconds. However now that I have fixed that I can see in the test that for some reason... a lifespan of 3 seconds is applied to the entry when a lifespan value of -1 is provided.
was (Author: william.burns):
Actually the latter is fine, I didn't realize the MetadataValue returns the lifespane and maxIdle in seconds instead of milliseconds. However now that I have fixed that I can see in the test that for some reason... a maxIdle of 3 seconds is applied to the entry for no reason which in turn removes it.
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5537) Upgrade to Lucene 5
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-5537?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-5537:
-----------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Upgrade to Lucene 5
> -------------------
>
> Key: ISPN-5537
> URL: https://issues.jboss.org/browse/ISPN-5537
> Project: Infinispan
> Issue Type: Feature Request
> Components: Embedded Querying
> Affects Versions: 8.0.0.Alpha1
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Fix For: 8.0.0.Beta3, 8.0.0.Final
>
>
> Update Infinispan directory to Lucene 5. Also required update to Hibernate Search 5.5.0.Alpha1, Hibernate ORM 5.0.0.CR3, Wildfly 10.0.0.Alpha6 (integration tests only)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5664) Null is returned for a not expired entry in Hot Rod client
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5664?page=com.atlassian.jira.plugin.... ]
William Burns commented on ISPN-5664:
-------------------------------------
Actually the latter is fine, I didn't realize the MetadataValue returns the lifespane and maxIdle in seconds instead of milliseconds. However now that I have fixed that I can see in the test that for some reason... a maxIdle of 3 seconds is applied to the entry for no reason which in turn removes it.
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months