[infinispan-issues] [JBoss JIRA] (ISPN-5667) Unify isExpired for time and entries
Dan Berindei (JIRA)
issues at jboss.org
Tue Sep 15 09:19:00 EDT 2015
[ https://issues.jboss.org/browse/ISPN-5667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108691#comment-13108691 ]
Dan Berindei commented on ISPN-5667:
------------------------------------
[~william.burns] overflow is not a problem, because ExpiryHelper only deals with wall-clock time (in milliseconds).
I would prefer changing {{ExpiryHelper}} to use {{>=}}. On the other hand, because {{ExpiryHelper.isExpiredMortal()}} works with {{System.currentTimeMillis()}} and {{DefaultTimeService.isTimeExpired()}} works with {{System.nanoTime()}}, I don't think it's possible to get them to agree all the time.
> Unify isExpired for time and entries
> ------------------------------------
>
> Key: ISPN-5667
> URL: https://issues.jboss.org/browse/ISPN-5667
> Project: Infinispan
> Issue Type: Bug
> Reporter: Radim Vansa
>
> {{DefaultTimeService.isTimeExpired()}} is implemented using non-strict comparison:
> {code}
> time() - endTime >= 0
> {code}
> while expiration of entries in {{ExpiryHelper}} uses strict one:
> {code}
> now > created + lifespan
> {code}
> I don't know which one should be the correct one, probably fixing this in TimeService will cause less trouble.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the infinispan-issues
mailing list