prettyClouds commented on a change in pull request #5128:
URL: https://github.com/apache/geode/pull/5128#discussion_r427567684



##########
File path: 
geode-redis/src/main/java/org/apache/geode/redis/internal/executor/ExistsExecutor.java
##########
@@ -20,22 +20,19 @@
 import org.apache.geode.redis.internal.Coder;
 import org.apache.geode.redis.internal.Command;
 import org.apache.geode.redis.internal.ExecutionHandlerContext;
-import org.apache.geode.redis.internal.RedisConstants.ArityDef;
 
 public class ExistsExecutor extends AbstractExecutor {
 
   @Override
   public void executeCommand(Command command, ExecutionHandlerContext context) 
{
     List<ByteArrayWrapper> commandElems = 
command.getProcessedCommandWrappers();
-    if (commandElems.size() < 2) {
-      
command.setResponse(Coder.getErrorResponse(context.getByteBufAllocator(), 
ArityDef.EXISTS));
-      return;
-    }
+    RedisKeyCommands redisKeyCommands =
+        new 
RedisKeyCommandsFunctionExecutor(context.getRegionProvider().getDataRegion());
 
     long existsCount = commandElems
         .subList(1, commandElems.size())
         .stream()
-        .filter(key -> context.getKeyRegistrar().isRegistered(key))
+        .filter(key -> redisKeyCommands.exists(key))

Review comment:
       lol...that would have been very passive aggressive




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


Reply via email to