jujoramos commented on a change in pull request #5070: URL: https://github.com/apache/geode/pull/5070#discussion_r422012672
########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java ########## @@ -1013,34 +1016,38 @@ public Lock getDistributedLock(Object key) throws IllegalStateException { return new DistributedLock(key); } - @Override - public void preInitialize() { - Set<String> allGatewaySenderIds = getAllGatewaySenderIds(); - - if (!allGatewaySenderIds.isEmpty()) { - for (GatewaySender sender : cache.getAllGatewaySenders()) { - if (sender.isParallel() && allGatewaySenderIds.contains(sender.getId())) { - // Once decided to support REPLICATED regions with parallel - // gateway-sender/asynchronous-event-queue, ShadowPartitionedRegionForUserRR should be - // called and this validation should be removed. - if (sender.getId().contains(AsyncEventQueueImpl.ASYNC_EVENT_QUEUE_PREFIX)) { - throw new AsyncEventQueueConfigurationException( - String.format( - "Parallel Async Event Queue %s can not be used with replicated region %s", - - AsyncEventQueueImpl.getAsyncEventQueueIdFromSenderId(sender.getId()), - getFullPath())); - } else { - throw new GatewaySenderConfigurationException( - String.format( - "Parallel gateway sender %s can not be used with replicated region %s", - sender.getId(), getFullPath())); - } + /** + * Validates that the GatewaySender/AsyncEventQueue referenced by the {@param asyncDispatcherId} + * can be attached to this region; that is, verifies that the dispatcher is not configured as + * parallel. + * + * @param asyncDispatcherId Id of the AsynchronousEventDispatcher to validate. Review comment: Yep, you got it right, the name is basically to group both types of async event dispatchers we currently have (`gateway-sender` and `async-event-listener`). I'm happy to change it, though, if a better name comes up 👍 ---------------------------------------------------------------- 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