You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2015/04/06 15:48:03 UTC
[2/2] incubator-usergrid git commit: Small fix to get app-delate (and
test) working again.
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/two-dot-o-dev
Commit: 94472c9d0a27127510a996e47db64d83dbfd075e
Parents: 4b126be
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Apr 6 09:47:49 2015 -0400
Committer: Dave Johnson <dm...@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 );
}