usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdun...@apache.org
Subject usergrid git commit: swallow exception if attempt to drop a keyspace during test setup and it has already been dropped
Date Wed, 09 Aug 2017 20:28:43 GMT
Repository: usergrid
Updated Branches:
  refs/heads/hotfix-20170728 b2705cf36 -> 874be4bb8


swallow exception if attempt to drop a keyspace during test setup and it has already been
dropped


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/874be4bb
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/874be4bb
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/874be4bb

Branch: refs/heads/hotfix-20170728
Commit: 874be4bb81207ae210229cbef15195f52309f75c
Parents: b2705cf
Author: Mike Dunker <mdunker@google.com>
Authored: Wed Aug 9 13:27:59 2017 -0700
Committer: Mike Dunker <mdunker@google.com>
Committed: Wed Aug 9 13:27:59 2017 -0700

----------------------------------------------------------------------
 .../core/migration/schema/MigrationManagerImpl.java           | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/874be4bb/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/schema/MigrationManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/schema/MigrationManagerImpl.java
b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/schema/MigrationManagerImpl.java
index cb62f4a..19321fe 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/schema/MigrationManagerImpl.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/schema/MigrationManagerImpl.java
@@ -79,7 +79,12 @@ public class MigrationManagerImpl implements MigrationManager {
         try {
 
             if (dropKeyspace) {
-                dropKeyspace();
+                try {
+                    dropKeyspace();
+                }
+                catch (Throwable t) {
+                    // keyspace may already have been dropped, swallow event
+                }
             }
 
             testAndCreateKeyspace();


Mime
View raw message