You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2014/11/19 01:20:36 UTC

[6/9] incubator-usergrid git commit: EXPERIMENTAL. Testing removing update logic as it's not used. If our tests still pass this will eliminate a lot of extra I/O. Note that in the UG model, we do a load+merge+save BEFORE the update method is called.

EXPERIMENTAL.  Testing removing update logic as it's not used.  If our tests still pass this will eliminate a lot of extra I/O.  Note that in the UG model, we do a load+merge+save BEFORE the update method is called.  As a result we aren't leveraging the update function of the collection manager, and I should not incur the performance cost.


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

Branch: refs/heads/two-dot-o-events
Commit: 4aea8e7476053885a6462306c1bce3129c5c460b
Parents: c28edda
Author: Todd Nine <tn...@apigee.com>
Authored: Mon Nov 17 20:21:52 2014 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Mon Nov 17 20:21:52 2014 -0700

----------------------------------------------------------------------
 .../apache/usergrid/corepersistence/CpEntityManager.java | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4aea8e74/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
index 2cb01d4..e2f67e8 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
@@ -551,11 +551,12 @@ public class CpEntityManager implements EntityManager {
         cpEntity = CpEntityMapUtils.fromMap( cpEntity, entity.getProperties(), entity.getType(), true );
 
         try {
-            cpEntity = ecm.update( cpEntity ).toBlockingObservable().last();
-
-
-            // need to reload entity so bypass entity cache
-            cpEntity = ecm.load( entityId ).toBlockingObservable().last();
+            cpEntity = ecm.write( cpEntity ).toBlocking().last();
+//            cpEntity = ecm.update( cpEntity ).toBlockingObservable().last();
+//
+//
+//            // need to reload entity so bypass entity cache
+//            cpEntity = ecm.load( entityId ).toBlockingObservable().last();
 
             logger.debug( "Wrote {}:{} version {}", new Object[] {
                     cpEntity.getId().getType(), cpEntity.getId().getUuid(), cpEntity.getVersion()