usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [20/50] [abbrv] incubator-usergrid git commit: removing mark in favor of delete edge
Date Mon, 01 Jun 2015 21:48:29 GMT
removing mark in favor of delete edge


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

Branch: refs/heads/USERGRID-628
Commit: ceadc6c17a1b21e5c9bf4235e350a2d7cf9ebf48
Parents: 758c0e5
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Thu May 28 07:16:53 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Thu May 28 07:16:53 2015 -0600

----------------------------------------------------------------------
 .../usergrid/corepersistence/CpEntityManagerFactory.java    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ceadc6c1/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 faee8a6..4ac42cc 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
@@ -382,10 +382,15 @@ public class CpEntityManagerFactory implements EntityManagerFactory,
Application
         }
         final ApplicationEntityIndex aei = entityIndexFactory.createApplicationEntityIndex(applicationScope);
         final GraphManager managementGraphManager = managerCache.getGraphManager(managementAppScope);
-        final Observable deleteNodeGraph = managementGraphManager.markNode( applicationId,
Long.MAX_VALUE );
+        Edge deleteEdge = CpNamingUtils.createCollectionEdge( CpNamingUtils.getManagementApplicationId(),collectionFromName,applicationId);
+        Edge createEdge = CpNamingUtils.createCollectionEdge( CpNamingUtils.getManagementApplicationId(),collectionToName,applicationId);
+
+        final Observable deleteNodeGraph = managementGraphManager.deleteEdge(deleteEdge);
+        final Observable createNodeGraph = managementGraphManager.writeEdge(createEdge);
+
         final Observable deleteAppFromIndex = aei.deleteApplication();
 
-        return Observable.concat(copyConnections, deleteNodeGraph, deleteAppFromIndex)
+        return Observable.concat(copyConnections, createNodeGraph, deleteNodeGraph, deleteAppFromIndex)
             .doOnCompleted(() -> {
                 try {
                     if (oldAppEntity != null) {


Mime
View raw message