geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject incubator-geode git commit: GEODE-216: Handle any exception that might be thrown
Date Thu, 13 Aug 2015 23:35:14 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 587f5896a -> 41d04928b


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/41d04928
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/41d04928
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/41d04928

Branch: refs/heads/develop
Commit: 41d04928be3a455b02e58432713ed694f5f2b238
Parents: 587f589
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Thu Aug 13 16:16:43 2015 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Thu Aug 13 16:16:43 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/41d04928/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) {


Mime
View raw message