You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ge...@apache.org on 2018/02/22 18:57:40 UTC

lucene-solr:master: Fix ConcurrentUpdateSolrClient.Builder withQueueSize Javadocs

Repository: lucene-solr
Updated Branches:
  refs/heads/master 364b680af -> d2d987fd7


Fix ConcurrentUpdateSolrClient.Builder withQueueSize Javadocs


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

Branch: refs/heads/master
Commit: d2d987fd7499e6394285f0744a5b331cc8bb2783
Parents: 364b680
Author: Jason Gerlowski <ge...@gmail.com>
Authored: Thu Feb 22 13:56:37 2018 -0500
Committer: Jason Gerlowski <ge...@gmail.com>
Committed: Thu Feb 22 13:56:37 2018 -0500

----------------------------------------------------------------------
 .../solrj/impl/ConcurrentUpdateSolrClient.java      | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d2d987fd/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
index d97bb2c..5845e7f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
@@ -803,7 +803,15 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
     }
     
     /**
-     * The number of documents to batch together before sending to Solr. If not set, this defaults to 10.
+     * The maximum number of requests buffered by the SolrClient's internal queue before being processed by background threads.
+     *
+     * This value should be carefully paired with the number of queue-consumer threads.  A queue with a maximum size
+     * set too high may require more memory.  A queue with a maximum size set too low may suffer decreased throughput
+     * as {@link ConcurrentUpdateSolrClient#request(SolrRequest)} calls block waiting to add requests to the queue.
+     *
+     * If not set, this defaults to 10.
+     *
+     * @see #withThreadCount(int)
      */
     public Builder withQueueSize(int queueSize) {
       if (queueSize <= 0) {
@@ -814,7 +822,11 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
     }
     
     /**
-     * The number of threads used to empty {@link ConcurrentUpdateSolrClient}s queue.
+     * The maximum number of threads used to empty {@link ConcurrentUpdateSolrClient}s queue.
+     *
+     * This value should be carefully paired with the maximum queue capacity.  A client with too few threads may suffer
+     * decreased throughput as the queue fills up and {@link ConcurrentUpdateSolrClient#request(SolrRequest)} calls
+     * block waiting to add requests to the queue.
      */
     public Builder withThreadCount(int threadCount) {
       if (threadCount <= 0) {