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

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

sabbey37 commented on a change in pull request #5678:
URL: https://github.com/apache/geode/pull/5678#discussion_r513757239



##########
File path: 
geode-redis/src/main/java/org/apache/geode/redis/internal/RedisStats.java
##########
@@ -206,6 +294,7 @@ public void endExpiration(long start) {
       stats.incLong(expirationTimeId, getTime() - start);
     }
     stats.incLong(expirationsId, 1);
+    expirations.incrementAndGet();

Review comment:
       I don't think we are counting expirations properly.  According to the 
Redis `INFO` docs (and also testing our version vs. Redis), it should be `the 
number of keys with an expiration` since we are using it in the `keyspace` 
section:
   ```
   The keyspace section provides statistics on the main dictionary of each 
database. The statistics are the number of keys, and the number of keys with an 
expiration.
   
   For each database, the following line is added:
   
   dbXXX: keys=XXX,expires=XXX
   ```
   
   This means that we should increment the count when any key has an expiration 
set and decrement it when that key no longer has an expiration (because it was 
persisted, expired on its own, was deleted, etc.).  Right now, we only 
increment the count when a key expires, and we never decrement it.




----------------------------------------------------------------
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.

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


> update Redis Info command To include additional statistics
> ----------------------------------------------------------
>
>                 Key: GEODE-8663
>                 URL: https://issues.apache.org/jira/browse/GEODE-8663
>             Project: Geode
>          Issue Type: Improvement
>          Components: redis
>            Reporter: John Hutchison
>            Priority: Major
>              Labels: pull-request-available
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to