You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2018/11/16 22:07:15 UTC

[geode] branch feature/GEODE-6068 updated: queue stop and destroy are now done together

This is an automated email from the ASF dual-hosted git repository.

dschneider pushed a commit to branch feature/GEODE-6068
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/GEODE-6068 by this push:
     new 4a2e727  queue stop and destroy are now done together
4a2e727 is described below

commit 4a2e727b3200473669d01a4b7e217a27b3c4ac54
Author: Darrel Schneider <ds...@pivotal.io>
AuthorDate: Fri Nov 16 14:06:44 2018 -0800

    queue stop and destroy are now done together
---
 .../geode/connectors/jdbc/internal/cli/DestroyMappingFunction.java | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingFunction.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingFunction.java
index 5a0a255..a572e87 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingFunction.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingFunction.java
@@ -55,11 +55,6 @@ public class DestroyMappingFunction extends CliFunction<String> {
 
   private void cleanupRegionAndQueue(Cache cache, String regionName) {
     String queueName = CreateMappingCommand.createAsyncEventQueueName(regionName);
-    InternalAsyncEventQueue queue = (InternalAsyncEventQueue) cache.getAsyncEventQueue(queueName);
-
-    if (queue != null) {
-      queue.stop();
-    }
 
     Region<?, ?> region = cache.getRegion(regionName);
     if (region != null) {
@@ -77,7 +72,9 @@ public class DestroyMappingFunction extends CliFunction<String> {
       }
     }
 
+    InternalAsyncEventQueue queue = (InternalAsyncEventQueue) cache.getAsyncEventQueue(queueName);
     if (queue != null) {
+      queue.stop();
       queue.destroy();
     }
   }