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: deliver event synchronously if it is rejected
Date Mon, 23 May 2016 22:31:25 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1428 [created] 09710f6ba


deliver event synchronously if it is rejected

Changed unit test to use close instead of emergencyClose.
Doing this caused an event to be sent after the async thread
pool was shutdown which resulted in a suspect warning without
this fix.


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

Branch: refs/heads/feature/GEODE-1428
Commit: 09710f6baff45eabf65a61986adfa3771d8b0ac2
Parents: 45a4ef2
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Mon May 23 15:28:30 2016 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Mon May 23 15:28:30 2016 -0700

----------------------------------------------------------------------
 .../java/com/gemstone/gemfire/internal/cache/LocalRegion.java   | 2 +-
 .../gemstone/gemfire/internal/cache/GemFireCacheImplTest.java   | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/09710f6b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index d28496c..6eb7313 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@ -7592,7 +7592,7 @@ public class LocalRegion extends AbstractRegion
           }
           catch (RejectedExecutionException rex) {
             ed.release();
-            logger.warn(LocalizedMessage.create(LocalizedStrings.LocalRegion_0_EVENT_NOT_DISPATCHED_DUE_TO_REJECTED_EXECUTION),
rex);
+            dispatchEvent(this, event, op);
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/09710f6b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GemFireCacheImplTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GemFireCacheImplTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GemFireCacheImplTest.java
index 7f95cad..71b7fc6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GemFireCacheImplTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GemFireCacheImplTest.java
@@ -61,10 +61,7 @@ public class GemFireCacheImplTest {
         return executor.getCompletedTaskCount() == MAX_THREADS+initialCount;
       });
     } finally {
-      // Note: if close is called it tries to dispatch and event which does not work
-      // because the async event pool has been shutdown.
-      // Once GEODE-1428 is fixed this test can call close instead of emergencyClose
-      gfc.emergencyClose();
+      gfc.close();
     }
   }
 }


Mime
View raw message