You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/05/28 15:16:58 UTC
incubator-usergrid git commit: removing mark in favor of delete edge
Repository: incubator-usergrid
Updated Branches:
refs/heads/two-dot-o-dev 758c0e52d -> ceadc6c17
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/two-dot-o-dev
Commit: ceadc6c17a1b21e5c9bf4235e350a2d7cf9ebf48
Parents: 758c0e5
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu May 28 07:16:53 2015 -0600
Committer: Shawn Feldman <sf...@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) {