boglesby commented on a change in pull request #5070: URL: https://github.com/apache/geode/pull/5070#discussion_r421739593
########## 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: I'm a bit confused regarding the use of AsynchronousEventDispatcher in the parameter comment and the method name. Is that just a grouping of GatewaySender and AsyncEventListener? ---------------------------------------------------------------- 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