You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/02/11 18:32:59 UTC

[GitHub] [geode] DonalEvans opened a new pull request #7359: GEODE-10047: Correct logging to report configured expiration interval

DonalEvans opened a new pull request #7359:
URL: https://github.com/apache/geode/pull/7359


   Authored-by: Donal Evans <do...@vmware.com>
   
   <!-- Thank you for submitting a contribution to Apache Geode. -->
   
   <!-- In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken: 
   -->
   
   ### For all changes:
   - [x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
   
   - [x] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
   
   - [x] Is your initial contribution a single, squashed commit?
   
   - [x] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   <!-- Note:
   Please ensure that once the PR is submitted, check Concourse for build issues and
   submit an update to your PR as soon as possible. If you need help, please send an
   email to dev@geode.apache.org.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] DonalEvans commented on a change in pull request #7359: GEODE-10047: Correct logging to report configured expiration interval

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on a change in pull request #7359:
URL: https://github.com/apache/geode/pull/7359#discussion_r805086317



##########
File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/PassiveExpirationManager.java
##########
@@ -76,8 +77,8 @@ private void doDataExpiration(RegionProvider regionProvider) {
       }
     } catch (CacheClosedException ignore) {
     } catch (RuntimeException | Error ex) {
-      logger.warn("Passive expiration failed. Will try again in 1 second.",
-          ex);
+      logger.warn("Passive expiration failed. Will try again in " + passiveExpirationInterval

Review comment:
       I've changed all mentions of passive expiration to active expiration.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dschneider-pivotal commented on a change in pull request #7359: GEODE-10047: Correct logging to report configured expiration interval

Posted by GitBox <gi...@apache.org>.
dschneider-pivotal commented on a change in pull request #7359:
URL: https://github.com/apache/geode/pull/7359#discussion_r805079523



##########
File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/statistics/RedisStats.java
##########
@@ -144,24 +144,15 @@ public long getKeyspaceMisses() {
     return keyspaceMisses.get();
   }
 
-  public long startPassiveExpirationCheck() {
-    return getCurrentTimeNanos();
-  }
-
   public void endPassiveExpirationCheck(long start, long expireCount) {
     geodeRedisStats.endPassiveExpirationCheck(start, expireCount);
   }
 
-  public long startExpiration() {

Review comment:
       I would be in favor of keeping these "bookend" start methods. I know that is this particular case all that start does is return getCurrentTimeNanos. But I think it is worth preserving the start/end pattern. And it would make it simple in the future to add other starts that are changed on start (like an in progress stat). I know these particular start methods can be unwrapped but then the abstraction is different and it is not as obvious in the caller how the start and end calls correspond.

##########
File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/PassiveExpirationManager.java
##########
@@ -76,8 +77,8 @@ private void doDataExpiration(RegionProvider regionProvider) {
       }
     } catch (CacheClosedException ignore) {
     } catch (RuntimeException | Error ex) {
-      logger.warn("Passive expiration failed. Will try again in 1 second.",
-          ex);
+      logger.warn("Passive expiration failed. Will try again in " + passiveExpirationInterval

Review comment:
       Something you don't need to clean up in this pr but that you remind me of is that I got the naming of this expiration manager wrong. Native Redis calls this "active" expiration. The expiration we do when we do an op and find the key expired is what native redis calls "passive" expiration. So these stats and log messages may be a bit confusing to native redis users.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] DonalEvans merged pull request #7359: GEODE-10047: Correct logging to report configured expiration interval

Posted by GitBox <gi...@apache.org>.
DonalEvans merged pull request #7359:
URL: https://github.com/apache/geode/pull/7359


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] DonalEvans commented on a change in pull request #7359: GEODE-10047: Correct logging to report configured expiration interval

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on a change in pull request #7359:
URL: https://github.com/apache/geode/pull/7359#discussion_r805085411



##########
File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/statistics/RedisStats.java
##########
@@ -144,24 +144,15 @@ public long getKeyspaceMisses() {
     return keyspaceMisses.get();
   }
 
-  public long startPassiveExpirationCheck() {
-    return getCurrentTimeNanos();
-  }
-
   public void endPassiveExpirationCheck(long start, long expireCount) {
     geodeRedisStats.endPassiveExpirationCheck(start, expireCount);
   }
 
-  public long startExpiration() {

Review comment:
       Okay, I've put these back as they were.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dschneider-pivotal commented on a change in pull request #7359: GEODE-10047: Correct logging to report configured expiration interval

Posted by GitBox <gi...@apache.org>.
dschneider-pivotal commented on a change in pull request #7359:
URL: https://github.com/apache/geode/pull/7359#discussion_r807393372



##########
File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/PassiveExpirationManager.java
##########
@@ -76,8 +77,8 @@ private void doDataExpiration(RegionProvider regionProvider) {
       }
     } catch (CacheClosedException ignore) {
     } catch (RuntimeException | Error ex) {
-      logger.warn("Passive expiration failed. Will try again in 1 second.",
-          ex);
+      logger.warn("Passive expiration failed. Will try again in " + passiveExpirationInterval

Review comment:
       Thank you!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org