[ 
https://issues.apache.org/jira/browse/GEODE-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16215644#comment-16215644
 ] 

ASF GitHub Bot commented on GEODE-3764:
---------------------------------------

sboorlagadda commented on a change in pull request #940: GEODE-3764: prevent 
early idle expiration
URL: https://github.com/apache/geode/pull/940#discussion_r146359953
 
 

 ##########
 File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/ExpiryTask.java
 ##########
 @@ -149,13 +155,34 @@ long getExpiryMillis() throws EntryNotFoundException {
    */
   protected boolean isExpirationPossible() throws EntryNotFoundException {
     long expTime = getExpirationTime();
-    if (expTime > 0L && getNow() >= expTime) {
-      return true;
+    if (expTime > 0L) {
 
 Review comment:
   @dschneider-pivotal Thanks Darrel. I thought the same that we should be 
expiring if its TTL.
   `getExpirationTime()` call in the previous line also checks if TTL or Idle 
and returns expiryTime based on the what is configured.
   Probably its more readable if the check is part of this function rather than 
in `isIdleExpiredOnOthers`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> idle expiration will happen even if the entry has been accessed on a replicate
> ------------------------------------------------------------------------------
>
>                 Key: GEODE-3764
>                 URL: https://issues.apache.org/jira/browse/GEODE-3764
>             Project: Geode
>          Issue Type: Bug
>          Components: docs, expiration
>            Reporter: Darrel Schneider
>            Assignee: Darrel Schneider
>
> Because idle expiration is currently always based on if the entry has been 
> accessed on the local node it is possible that entries will idle expire even 
> if they were accessed recently.
> Since reads are only sent to one member, the last access time is only updated 
> on that member. The expiration action itself is distributed so if any member 
> was not read from recently, it will cause the entry to be expired on the 
> entire cluster.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to