You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by zh...@apache.org on 2020/08/31 05:16:10 UTC

[geode] 01/01: GEODE-8432-2: use getRegionPath instead of getRegion to avoid waitOnInitiailize

This is an automated email from the ASF dual-hosted git repository.

zhouxj pushed a commit to branch feature/GEODE-8432
in repository https://gitbox.apache.org/repos/asf/geode.git

commit d3336cec8fc23383263cc929177b5a7a57e7e76a
Author: zhouxh <gz...@pivotal.io>
AuthorDate: Sun Aug 30 22:13:39 2020 -0700

    GEODE-8432-2: use getRegionPath instead of getRegion to avoid waitOnInitiailize
---
 .../geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java   | 2 +-
 .../cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
index 1a18d8d..58072bb 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
@@ -694,7 +694,7 @@ public class ParallelGatewaySenderQueue implements RegionQueue {
 
     String regionPath = value.getRegionPath();
     if (!isDREvent) {
-      Region region = sender.getCache().getRegion(regionPath, true);
+      Region region = sender.getCache().getRegionByPath(regionPath);
       regionPath = ColocationHelper.getLeaderRegion((PartitionedRegion) region).getFullPath();
     }
     if (isDebugEnabled) {
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
index 4a50725..3c5bbfb 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
@@ -104,7 +104,7 @@ public class ParallelGatewaySenderQueueJUnitTest {
     when(event.getRegionPath()).thenReturn(regionPath);
     PartitionedRegion region = mock(PartitionedRegion.class);
     when(region.getFullPath()).thenReturn(regionPath);
-    when(cache.getRegion(regionPath, true)).thenReturn(region);
+    when(cache.getRegionByPath(regionPath)).thenReturn(region);
     PartitionAttributes pa = mock(PartitionAttributes.class);
     when(region.getPartitionAttributes()).thenReturn(pa);
     when(pa.getColocatedWith()).thenReturn(null);