geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (GEODE-3764) idle expiration will happen even if the entry has been accessed on a replicate
Date Mon, 23 Oct 2017 18:45:00 GMT


ASF GitHub Bot commented on GEODE-3764:

dschneider-pivotal commented on a change in pull request #940: GEODE-3764: prevent early idle

 File path: geode-core/src/main/java/org/apache/geode/internal/cache/
 @@ -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:
   Then it is okay to just expire based on the local information.
   Since last modified time is always changed by a write and since writes go to every copy
of the data the ttl check only needs to happen locally.
   The way this works in this fix is that the implementation of isIdleExpiredOnOthers
   does this check:
       if (getIdleAttributes().getTimeout() <= 0L) {
         // idle expiration is not being used
         return true;
   So if you expiration configuration does not care about idle time then we just return true
which means expiration is possible.
   If we are using idle time then we fetch it from others and redo this calculation which
may cause is to still expire due to ttl (note that you can have both idle and ttl configured
on a region).

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:

> idle expiration will happen even if the entry has been accessed on a replicate
> ------------------------------------------------------------------------------
>                 Key: GEODE-3764
>                 URL:
>             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

View raw message