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 2021/10/28 01:08:10 UTC

[GitHub] [geode] dschneider-pivotal commented on a change in pull request #7019: GEODE-9646: Update native redis tests to consistently use version 6.2.6

dschneider-pivotal commented on a change in pull request #7019:
URL: https://github.com/apache/geode/pull/7019#discussion_r737947110



##########
File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/executor/pubsub/PubSubExecutor.java
##########
@@ -54,7 +54,7 @@ public RedisResponse executeCommand(Command command, ExecutionHandlerContext con
         return RedisResponse
             .error(String.format(ERROR_UNKNOWN_PUBSUB_SUBCOMMAND, new String(subCommand)));
       }
-      long numPatResponse = context.getPubSub().findNumberOfSubscribedPatterns();
+      long numPatResponse = context.getPubSub().findNumberOfUniqueSubscribedPatterns();

Review comment:
       this seems like a bug you found in our PUBSUB command impl. Did it only show up with 6.2?

##########
File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/AbstractSubscriptionManager.java
##########
@@ -87,6 +91,16 @@ public int getSubscriptionCount() {
     return sum;
   }
 
+  public int getUniqueSubscriptionCount() {
+    Set<byte[]> uniques = new ObjectOpenCustomHashSet<>(ByteArrays.HASH_STRATEGY);

Review comment:
       I think this is overkill. On this class "clientManagers" is already a map of unique channel/patterns to ClientSubscriptionManager instances. So all you need to do in this method is return "clientManagers.size()". 




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