usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [14/50] incubator-usergrid git commit: Small fix to get app-delate (and test) working again.
Date Mon, 13 Apr 2015 17:45:39 GMT
Small fix to get app-delate (and test) working again.


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

Branch: refs/heads/USERGRID-536
Commit: 94472c9d0a27127510a996e47db64d83dbfd075e
Parents: 4b126be
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Mon Apr 6 09:47:49 2015 -0400
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Mon Apr 6 09:47:49 2015 -0400

----------------------------------------------------------------------
 .../usergrid/corepersistence/CpEntityManagerFactory.java     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/94472c9d/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
index c81b47f..1a9091e 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
@@ -336,10 +336,12 @@ public class CpEntityManagerFactory implements EntityManagerFactory,
Application
         // delete the app from the application_info collection
 
         em.delete(appInfoToDelete);
+        applicationIdCache.evictAppId(appInfoToDelete.getName());
 
-        // TODO: what do we need to do about cleaning up graph edges from deleted app to
its connected entities?
 
-        applicationIdCache.evictAppId(appInfoToDelete.getName());
+        // TODO: clean up all graph edges from application_info to connected entities
+
+        // TODO: purge application indexes?
     }
 
 
@@ -436,7 +438,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
         final String edgeType;
 
         if ( deleted ) {
-            edgeType = CpNamingUtils.getEdgeTypeFromCollectionName( CpNamingUtils.DELETED_APPLICATION_INFO
);
+            edgeType = CpNamingUtils.getEdgeTypeFromCollectionName( CpNamingUtils.DELETED_APPLICATION_INFOS
);
         } else {
             edgeType = CpNamingUtils.getEdgeTypeFromCollectionName( CpNamingUtils.APPLICATION_INFOS
);
         }


Mime
View raw message