GEODE-216: Handle any exception that might be thrown The old code was trying to prevent a deadlock under some certain conditions. But if it can not get a PR because of an exception then a deadlock is not possible. So the new code just catches and ignores exceptions and falls through to the code that will process the message the old way. This code will encounter the same exception and has the proper logic to handle it.
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d3bdb68b Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d3bdb68b Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d3bdb68b Branch: refs/heads/develop Commit: d3bdb68b8e5c881b42e285d9e5bdc46ed07f6c71 Parents: e865b35 Author: Darrel Schneider <dschnei...@pivotal.io> Authored: Thu Aug 13 16:16:43 2015 -0700 Committer: Kirk Lund <kl...@pivotal.io> Committed: Wed Aug 19 16:08:03 2015 -0700 ---------------------------------------------------------------------- .../gemfire/internal/cache/partitioned/GetMessage.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d3bdb68b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java index c8d990d..64cbccd 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java @@ -129,6 +129,12 @@ public final class GetMessage extends PartitionMessageWithDirectReply return DistributionManager.PARTITIONED_REGION_EXECUTOR; } } catch (PRLocallyDestroyedException ignore) { + } catch (RuntimeException ignore) { + // fix for GEODE-216 + // Most likely here would be RegionDestroyedException or CacheClosedException + // but the cancel criteria code can throw any RuntimeException. + // In all these cases it is ok to just fall through and return the + // old executor type. } } if (forceUseOfPRExecutor) {