You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2016/02/06 18:34:38 UTC

lucene-solr git commit: SOLR-8500: Allow the number of threads ConcurrentUpdateSolrClient StreamingSolrClients configurable by a system property

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_5x 235d8c09d -> 129f71530


SOLR-8500: Allow the number of threads ConcurrentUpdateSolrClient StreamingSolrClients configurable by a system property

(cherry picked from commit 3e7fe7867f64b254680d462092d01f07858aa7c3)

Conflicts:
	solr/CHANGES.txt


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

Branch: refs/heads/branch_5x
Commit: 129f7153087b279908d6340e7f8a5b024f0f7cad
Parents: 235d8c0
Author: Erick Erickson <er...@apache.org>
Authored: Sat Feb 6 09:19:26 2016 -0800
Committer: Erick Erickson <er...@apache.org>
Committed: Sat Feb 6 09:33:03 2016 -0800

----------------------------------------------------------------------
 solr/CHANGES.txt                                                 | 4 ++++
 .../src/java/org/apache/solr/update/StreamingSolrClients.java    | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/129f7153/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 2b7b46e..8273ebe 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -122,6 +122,10 @@ New Features
 * SOLR-8586: added index fingerprint, a hash over all versions currently in the index.
   PeerSync now uses this to check if replicas are in sync. (yonik)
 
+* SOLR-8500: Allow the number of threads ConcurrentUpdateSolrClient StreamingSolrClients configurable by a 
+  system property. NOTE: this is an expert option and can result in more often needing to do full index replication
+  for recovery, the sweet spot for using this is very high volume, leader-only indexing. (Tim Potter, Erick Erickson)
+
 
 Bug Fixes
 ----------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/129f7153/solr/core/src/java/org/apache/solr/update/StreamingSolrClients.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/StreamingSolrClients.java b/solr/core/src/java/org/apache/solr/update/StreamingSolrClients.java
index 0ca8149..ecc2a2b 100644
--- a/solr/core/src/java/org/apache/solr/update/StreamingSolrClients.java
+++ b/solr/core/src/java/org/apache/solr/update/StreamingSolrClients.java
@@ -41,6 +41,8 @@ import java.util.concurrent.ExecutorService;
 
 public class StreamingSolrClients {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+  private final int runnerCount = Integer.getInteger("solr.cloud.replication.runners", 1);
   
   private HttpClient httpClient;
   
@@ -70,7 +72,7 @@ public class StreamingSolrClients {
       // NOTE: increasing to more than 1 threadCount for the client could cause updates to be reordered
       // on a greater scale since the current behavior is to only increase the number of connections/Runners when
       // the queue is more than half full.
-      client = new ConcurrentUpdateSolrClient(url, httpClient, 100, 1, updateExecutor, true) {
+      client = new ConcurrentUpdateSolrClient(url, httpClient, 100, runnerCount, updateExecutor, true) {
         @Override
         public void handleError(Throwable ex) {
           req.trackRequestResult(null, false);