lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cpoersc...@apache.org
Subject lucene-solr:branch_5x: SOLR-9074: solrj CloudSolrClient.directUpdate tweak
Date Fri, 06 May 2016 10:41:04 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_5x 8835a45fe -> 10cbbb56a


SOLR-9074: solrj CloudSolrClient.directUpdate tweak

Defer two NamedList allocations and initialCapacity one of them.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/10cbbb56
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/10cbbb56
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/10cbbb56

Branch: refs/heads/branch_5x
Commit: 10cbbb56a91e8998490d65f11a9daed101402dfa
Parents: 8835a45
Author: Christine Poerschke <cpoerschke@apache.org>
Authored: Fri May 6 09:57:22 2016 +0100
Committer: Christine Poerschke <cpoerschke@apache.org>
Committed: Fri May 6 10:54:54 2016 +0100

----------------------------------------------------------------------
 .../org/apache/solr/client/solrj/impl/CloudSolrClient.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10cbbb56/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
index c7e670c..dfbe75a 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
@@ -584,14 +584,14 @@ public class CloudSolrClient extends SolrClient {
       return null;
     }
 
-    NamedList<Throwable> exceptions = new NamedList<>();
-    NamedList<NamedList> shardResponses = new NamedList<>();
-
     Map<String, LBHttpSolrClient.Req> routes = updateRequest.getRoutes(router, col,
urlMap, routableParams, this.idField);
     if (routes == null) {
       return null;
     }
 
+    final NamedList<Throwable> exceptions = new NamedList<>();
+    final NamedList<NamedList> shardResponses = new NamedList<>(routes.size()+1);
// +1 for deleteQuery
+
     long start = System.nanoTime();
 
     if (parallelUpdates) {


Mime
View raw message