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:58:18 UTC
lucene-solr:branch_7x: Fix ConcurrentUpdateSolrClient.Builder
withQueueSize Javadocs
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x 3f9d19996 -> 96eb58de0
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/96eb58de
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/96eb58de
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/96eb58de
Branch: refs/heads/branch_7x
Commit: 96eb58de09e42c1dc6ac698fb9c06d2021ef10da
Parents: 3f9d199
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:58:10 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/96eb58de/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) {