geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [31/34] incubator-geode git commit: GEODE-1428: deliver event synchronously if it is rejected
Date Wed, 25 May 2016 22:27:53 GMT
GEODE-1428: 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/fa6e722e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/fa6e722e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/fa6e722e

Branch: refs/heads/feature/GEODE-835
Commit: fa6e722e727a6f40788014aa6cac17890f6a64c9
Parents: cae8f7f
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Mon May 23 15:28:30 2016 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Wed May 25 10:07:48 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/fa6e722e/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 8be9c4b..cc5ac59 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
@@ -7581,7 +7581,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/fa6e722e/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