[ https://issues.apache.org/jira/browse/GEODE-8432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17180111#comment-17180111 ]
ASF GitHub Bot commented on GEODE-8432: --------------------------------------- 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 > use regionPath directly instead of getRegion when put event into > parallelGatewaySenderQueue > ------------------------------------------------------------------------------------------- > > Key: GEODE-8432 > URL: https://issues.apache.org/jira/browse/GEODE-8432 > Project: Geode > Issue Type: Improvement > Reporter: Xiaojian Zhou > Assignee: Xiaojian Zhou > Priority: Major > Labels: GeodeOperationAPI, pull-request-available > Fix For: 1.14.0 > > > ParallelGatewaySenderQueue tried to put but find the value's reference to > region is null. > When the put happens, the data region might be in middle of GII. Need to > error handle this case. > It looks like the member received the reply from SyncWith message for the > queue. > But when the member tried to put the event into its own queue, and find the > local data region is not ready. (because it's in middle of GII or recovery) > The stack trace is: > at > org.apache.geode.internal.cache.CacheFactoryStatics.getAnyInstance(CacheFactoryStatics.java:85) > at > org.apache.geode.cache.CacheFactory.getAnyInstance(CacheFactory.java:396) > at > org.apache.geode.internal.cache.wan.GatewaySenderEventImpl.getRegion(GatewaySenderEventImpl.java:1217) > at > org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueue.put(ParallelGatewaySenderQueue.java:696) > at > org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderEventProcessor.enqueueEvent(ParallelGatewaySenderEventProcessor.java:138) > at > org.apache.geode.internal.cache.wan.parallel.ConcurrentParallelGatewaySenderEventProcessor.enqueueEvent(ConcurrentParallelGatewaySenderEventProcessor.java:354) > at > org.apache.geode.internal.cache.wan.AbstractGatewaySender.putSynchronizationEvent(AbstractGatewaySender.java:1507) > at > org.apache.geode.internal.cache.wan.GatewaySenderQueueEntrySynchronizationOperation$GatewaySenderQueueEntrySynchronizationReplyProcessor.putSynchronizationEvents(GatewaySenderQueueEntrySynchronizationOperation.java:162) -- This message was sent by Atlassian Jira (v8.3.4#803005)