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. Project: http://git-wip-us.apache.org/repos/asf/geode/repo Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/360c3d53 Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/360c3d53 Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/360c3d53 Branch: refs/heads/feature/GEM-1601 Commit: 360c3d536fb12106645d9942546324fc446546fe Parents: 1c04aab Author: zhouxh <[email protected]> Authored: Fri Aug 18 14:51:31 2017 -0700 Committer: zhouxh <[email protected]> Committed: Fri Aug 18 16:10:06 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/360c3d53/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);
