geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [21/36] incubator-geode git commit: GEODE-1172: Closed all GatewaySenders when a ForcedDisconnectException occurs
Date Fri, 08 Apr 2016 16:26:39 GMT
GEODE-1172: Closed all GatewaySenders when a ForcedDisconnectException occurs


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

Branch: refs/heads/feature/GEODE-17-2
Commit: f612bf9a8d775c6f096ae6c5e137cb5e9690373d
Parents: abedde9
Author: Barry Oglesby <boglesby@pivotal.io>
Authored: Tue Apr 5 17:32:21 2016 -0700
Committer: Barry Oglesby <boglesby@pivotal.io>
Committed: Wed Apr 6 10:00:32 2016 -0700

----------------------------------------------------------------------
 .../asyncqueue/internal/SerialAsyncEventQueueImpl.java      | 4 ++++
 .../gemstone/gemfire/internal/cache/GemFireCacheImpl.java   | 9 ++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f612bf9a/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
b/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
index 5669aed..16ffbde 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
@@ -16,6 +16,7 @@
  */
 package com.gemstone.gemfire.cache.asyncqueue.internal;
 
+import com.gemstone.gemfire.CancelException;
 import org.apache.logging.log4j.Logger;
 
 import com.gemstone.gemfire.cache.Cache;
@@ -168,7 +169,10 @@ public class SerialAsyncEventQueueImpl extends AbstractGatewaySender
{
       }
     }
     this.setIsPrimary(false);
+    try {
     new UpdateAttributesProcessor(this).distribute(false);
+    } catch (CancelException e) {
+    }
     Thread lockObtainingThread = getSenderAdvisor().getLockObtainingThread();
     if (lockObtainingThread != null && lockObtainingThread.isAlive()) {
       // wait a while for thread to terminate

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f612bf9a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
index 9902be5..05bc838 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
@@ -2072,10 +2072,10 @@ public class GemFireCacheImpl implements InternalCache, ClientCache,
HasCachePer
           // ignore
         }
 
-        try {
           GatewaySenderAdvisor advisor = null;
           for (GatewaySender sender : this.getAllGatewaySenders()) {
-            ((AbstractGatewaySender) sender).stop();
+            try {
+            sender.stop();
             advisor = ((AbstractGatewaySender) sender).getSenderAdvisor();
             if (advisor != null) {
               if (isDebugEnabled) {
@@ -2083,12 +2083,11 @@ public class GemFireCacheImpl implements InternalCache, ClientCache,
HasCachePer
               }
               advisor.close();
             }
+            } catch (CancelException ce) {
+            }
           }
           ParallelGatewaySenderQueue.cleanUpStatics(null);
-        } catch (CancelException ce) {
 
-        }
-        
         destroyGatewaySenderLockService();
 
         if (ASYNC_EVENT_LISTENERS) {


Mime
View raw message