GEODE-3055: Should use a conservative fix to only catch the PartitionOfflineEx
to remove the leader region bucket.

Previous fix to catch all RuntimeException is too aggressive.

This closes #723


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

Branch: refs/heads/feature/GEODE-1279
Commit: d809076d01c28b9b819ab32d6af172004b3f8740
Parents: 1c04aab
Author: zhouxh <[email protected]>
Authored: Fri Aug 18 14:51:31 2017 -0700
Committer: zhouxh <[email protected]>
Committed: Fri Aug 18 16:11:53 2017 -0700

----------------------------------------------------------------------
 .../apache/geode/internal/cache/PartitionedRegionDataStore.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/d809076d/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 3d9ac18..6b0c0a8 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
@@ -21,6 +21,7 @@ import org.apache.geode.cache.Region.Entry;
 import org.apache.geode.cache.execute.Function;
 import org.apache.geode.cache.execute.FunctionException;
 import org.apache.geode.cache.execute.ResultSender;
+import org.apache.geode.cache.persistence.PartitionOfflineException;
 import org.apache.geode.cache.query.QueryInvalidException;
 import org.apache.geode.cache.query.internal.QCompiler;
 import org.apache.geode.cache.query.internal.index.IndexCreationData;
@@ -493,7 +494,7 @@ public class PartitionedRegionDataStore implements 
HasCachePerfStats {
 
       return result;
 
-    } catch (RuntimeException validationException) {
+    } catch (PartitionOfflineException validationException) {
       // GEODE-3055
       PartitionedRegion leader = 
ColocationHelper.getLeaderRegion(this.partitionedRegion);
       boolean isLeader = leader.equals(this.partitionedRegion);

Reply via email to