You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2016/02/07 20:45:40 UTC

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

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


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

Branch: refs/heads/jira/lucene-5438-nrt-replication
Commit: 3e7fe7867f64b254680d462092d01f07858aa7c3
Parents: 207f7f9
Author: Erick Erickson <er...@apache.org>
Authored: Sat Feb 6 08:34:04 2016 -0800
Committer: Erick Erickson <er...@apache.org>
Committed: Sat Feb 6 08:34:04 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/3e7fe786/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 348cf01..e93c45a 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -144,6 +144,10 @@ New Features
 
 * SOLR-8285: Ensure the /export handler works with NULL field values (Joel Bernstein)
 
+* 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
 ----------------------
 * SOLR-8386: Add field option in the new admin UI schema page loads up even when no schemaFactory has been

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3e7fe786/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);