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 2017/08/11 17:26:53 UTC

[23/23] geode git commit: GEODE-3304: when colocated child bucket is destroyed, it should not impact its parent bucket's creation.

GEODE-3304: when colocated child bucket is destroyed, it should not impact its
parent bucket's creation.


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/4deb189d
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/4deb189d
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/4deb189d

Branch: refs/heads/feature/GEODE-3304
Commit: 4deb189d56fcd3d40348cc4ee18c8bb7a91493f4
Parents: 894f3ee
Author: zhouxh <gz...@pivotal.io>
Authored: Wed Aug 9 16:55:41 2017 -0700
Committer: zhouxh <gz...@pivotal.io>
Committed: Fri Aug 11 10:26:04 2017 -0700

----------------------------------------------------------------------
 .../internal/cache/PartitionedRegionDataStore.java      | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/4deb189d/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java
index a63a7dd..95e6598 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java
@@ -2881,8 +2881,16 @@ public class PartitionedRegionDataStore implements HasCachePerfStats {
         }
         if ((isDiskRecovery || pr.isInitialized())
             && (pr.getDataStore().isColocationComplete(bucketId))) {
-          grab = pr.getDataStore().grabFreeBucketRecursively(bucketId, pr, moveSource,
-              forceCreation, replaceOffineData, isRebalance, creationRequestor, isDiskRecovery);
+          try {
+            grab = pr.getDataStore().grabFreeBucketRecursively(bucketId, pr, moveSource,
+                forceCreation, replaceOffineData, isRebalance, creationRequestor, isDiskRecovery);
+          } catch (RegionDestroyedException rde) {
+            if (logger.isDebugEnabled()) {
+              logger.debug("Failed to grab, colocated region for bucketId = {}{}{} is destroyed.",
+                  this.partitionedRegion.getPRId(), PartitionedRegion.BUCKET_ID_SEPARATOR,
+                  bucketId);
+            }
+          }
           if (!grab.nowExists()) {
             if (logger.isDebugEnabled()) {
               logger.debug("Failed grab for bucketId = {}{}{}", this.partitionedRegion.getPRId(),