pivotal-eshu commented on a change in pull request #5464: URL: https://github.com/apache/geode/pull/5464#discussion_r472499344
########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java ########## @@ -693,15 +693,19 @@ public boolean put(Object object) throws InterruptedException, CacheException { boolean isDREvent = isDREvent(sender.getCache(), value); - Region region = value.getRegion(); - String regionPath = null; - if (isDREvent) { - regionPath = region.getFullPath(); - } else { + String regionPath = value.getRegionPath(); + if (!isDREvent) { + Region region = sender.getCache().getRegion(regionPath); Review comment: sender.getCache().getRegion(regionPath) should not be null due to initialization as it invokes region.waitOnInitialization(). If region is null, I think it indicates region is destroyed. ########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java ########## @@ -693,15 +693,19 @@ public boolean put(Object object) throws InterruptedException, CacheException { boolean isDREvent = isDREvent(sender.getCache(), value); - Region region = value.getRegion(); - String regionPath = null; - if (isDREvent) { - regionPath = region.getFullPath(); - } else { + String regionPath = value.getRegionPath(); + if (!isDREvent) { + Region region = sender.getCache().getRegion(regionPath); + if (region == null) { + if (isDebugEnabled) { + logger.debug("The PR " + regionPath + " has not finished initializing."); + } + region = value.getRegion(); Review comment: Should not use value.getRegion() here as it will still cause the hang. ---------------------------------------------------------------- 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