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



##########
File path: 
geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/sortedset/ZAddExecutor.java
##########
@@ -46,11 +45,17 @@ public RedisResponse executeCommand(Command command, 
ExecutionHandlerContext con
       return RedisResponse.error(zAddExecutorState.exceptionMessage);
     }
 
-    long retVal = redisSortedSetCommands.zadd(command.getKey(),
+    Object retVal = redisSortedSetCommands.zadd(command.getKey(),
         new ArrayList<>(commandElements.subList(optionsFoundCount + 2, 
commandElements.size())),
         makeOptions(zAddExecutorState));
+    if (zAddExecutorState.incrFound) {
+      if (retVal == null) {
+        return RedisResponse.nil();
+      }
+      return RedisResponse.string((byte[]) retVal);

Review comment:
       Good catch!  I wonder if there are other places where we're returning 
simple string instead of bulk string...




-- 
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:
[email protected]


Reply via email to