usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject usergrid git commit: Add flag to turn of de-indexing of old entity versions during updates.
Date Tue, 05 Apr 2016 04:39:26 GMT
Repository: usergrid
Updated Branches:
  refs/heads/release-2.1.1 0cb4e08f2 -> d7119a48c


Add flag to turn of de-indexing of old entity versions during updates.


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

Branch: refs/heads/release-2.1.1
Commit: d7119a48c1f98b5f63a4a2fb3582f9fd1b9f9ec0
Parents: 0cb4e08
Author: Michael Russo <mrusso@apigee.com>
Authored: Mon Apr 4 21:38:51 2016 -0700
Committer: Michael Russo <mrusso@apigee.com>
Committed: Mon Apr 4 21:38:51 2016 -0700

----------------------------------------------------------------------
 .../org/apache/usergrid/corepersistence/CpEntityManager.java     | 4 +++-
 .../org/apache/usergrid/corepersistence/EntityManagerFig.java    | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/d7119a48/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 b29e6d3..42107f3 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
@@ -593,7 +593,9 @@ public class CpEntityManager implements EntityManager {
 
 
         // queue up an event to clean-up older versions than this one from the index
-        indexService.queueDeIndexOldVersion( applicationScope, entityId );
+        if(entityManagerFig.deIndexOldVersions()) {
+            indexService.queueDeIndexOldVersion(applicationScope, entityId);
+        }
     }
 
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/d7119a48/stack/core/src/main/java/org/apache/usergrid/corepersistence/EntityManagerFig.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/EntityManagerFig.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/EntityManagerFig.java
index 45bebc6..1528e46 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/EntityManagerFig.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/EntityManagerFig.java
@@ -37,4 +37,8 @@ public interface EntityManagerFig extends GuicyFig {
     @Key( "usergrid.entityManager_sleep_ms" )
     @Default( "100" )
     int sleep();
+
+    @Key( "usergrid.entityManager.deindex_old_versions" )
+    @Default( "false" )
+    boolean deIndexOldVersions();
 }


Mime
View raw message