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

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_r513658138



##########
File path: 
geode-redis/src/main/java/org/apache/geode/redis/internal/data/RedisKeyCommandsFunctionExecutor.java
##########
@@ -33,12 +33,34 @@ public boolean del(ByteArrayWrapper key) {
 
   @Override
   public boolean exists(ByteArrayWrapper key) {
-    return stripedExecute(key, () -> getRedisData(key).exists());
+    boolean keyExists =
+        stripedExecute(
+            key,
+            () -> getRedisData(key).exists());
+
+    if (keyExists) {
+      helper.getRedisStats().incKeyspaceHits();
+    } else {
+      helper.getRedisStats().incKeyspaceMisses();
+    }

Review comment:
       Similar to the comment in the `CommandHelper` class, if we decide to 
increment the hits/misses this way, we could consolidate all of these and just 
have the if/else in the `getRedisData` method.




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