usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdun...@apache.org
Subject usergrid git commit: Reduce number of old ES indexes that are being deleted at a time.
Date Mon, 04 Apr 2016 21:46:00 GMT
Repository: usergrid
Updated Branches:
  refs/heads/release-2.1.1 43d85599f -> dcd8c39f3


Reduce number of old ES indexes that are being deleted at a time.


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

Branch: refs/heads/release-2.1.1
Commit: dcd8c39f396bffa79395ef504c9640eb492dde8f
Parents: 43d8559
Author: Mike Dunker <mdunker@apigee.com>
Authored: Mon Apr 4 14:44:18 2016 -0700
Committer: Mike Dunker <mdunker@apigee.com>
Committed: Mon Apr 4 14:44:18 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/usergrid/persistence/index/IndexFig.java   | 6 ++++++
 .../usergrid/persistence/index/impl/EsEntityIndexImpl.java     | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/dcd8c39f/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/IndexFig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/IndexFig.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/IndexFig.java
index e81219a..447169e 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/IndexFig.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/IndexFig.java
@@ -62,6 +62,8 @@ public interface IndexFig extends GuicyFig {
 
     String ELASTICSEARCH_VERSION_QUERY_LIMIT = "elasticsearch.version_query_limit";
 
+    String ELASTICSEARCH_OLD_VERSION_QUERY_LIMIT = "elasticsearch.old_version_query_limit";
+
 
     /**
      * Comma-separated list of Elasticsearch hosts.
@@ -205,4 +207,8 @@ public interface IndexFig extends GuicyFig {
     @Default("1000")
     @Key( ELASTICSEARCH_VERSION_QUERY_LIMIT )
     int getVersionQueryLimit();
+
+    @Default("10")
+    @Key( ELASTICSEARCH_OLD_VERSION_QUERY_LIMIT )
+    int getOldVersionQueryLimit();
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/dcd8c39f/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
index ba3af95..a601997 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
@@ -544,7 +544,7 @@ public class EsEntityIndexImpl implements EntityIndex,VersionedData {
         final long markedTimestamp = markedVersion.timestamp();
 
         // never let the limit be less than 2 as there are potential indefinite paging issues
-        final int searchLimit = Math.max(2, indexFig.getVersionQueryLimit());
+        final int searchLimit = Math.max(2, indexFig.getOldVersionQueryLimit());
 
         // this query will find the document for the entity itself
         final QueryBuilder entityQuery = QueryBuilders


Mime
View raw message