jdeppe-pivotal commented on a change in pull request #6704:
URL: https://github.com/apache/geode/pull/6704#discussion_r675762310
##########
File path:
geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/pubsub/PubSubImpl.java
##########
@@ -58,23 +62,25 @@ public int getSubscriptionCount() {
@Override
public long publish(RegionProvider regionProvider, byte[] channel, byte[]
message) {
- Set<DistributedMember> membersWithDataRegion =
regionProvider.getRegionMembers();
- @SuppressWarnings("unchecked")
- ResultCollector<String[], List<Long>> subscriberCountCollector =
FunctionService
- .onMembers(membersWithDataRegion)
- .setArguments(new Object[] {channel, message})
- .execute(REDIS_PUB_SUB_FUNCTION_ID);
+ executor.submit(() -> internalPublish(regionProvider, channel, message));
- List<Long> subscriberCounts = null;
+ return subscriptions.findSubscriptions(channel).size();
Review comment:
`findSubscriptions` only considers local subscribers and doesn't account
for remote ones. So, unfortunately, we still need to always issue the fn call.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]