You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by cp...@apache.org on 2024/08/14 08:31:35 UTC

(solr) branch branch_9x updated: SOLR-13350, SOLR-17298: use multiThreaded=false default; document multiThreaded parameter; (#2596)

This is an automated email from the ASF dual-hosted git repository.

cpoerschke pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 84d1fbc45e1 SOLR-13350, SOLR-17298: use multiThreaded=false default; document multiThreaded parameter; (#2596)
84d1fbc45e1 is described below

commit 84d1fbc45e173b3da268215e77c1c8cf7af84c78
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Tue Aug 6 23:27:23 2024 +0100

    SOLR-13350, SOLR-17298: use multiThreaded=false default; document multiThreaded parameter; (#2596)
    
    Co-authored-by: Gus Heck <gu...@apache.org>
    (cherry picked from commit 7ebbcd3493cc5658ad86480906813144125fbc43)
---
 solr/CHANGES.txt                                               |  2 +-
 .../java/org/apache/solr/handler/component/QueryComponent.java |  2 +-
 .../configuration-guide/pages/configuring-solr-xml.adoc        |  1 +
 .../modules/query-guide/pages/common-query-parameters.adoc     | 10 ++++++++++
 .../src/java/org/apache/solr/common/params/CommonParams.java   |  3 +++
 5 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 4109ce4af82..0262d787ad4 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -42,7 +42,7 @@ Other Changes
 ==================  9.7.0 ==================
 New Features
 ---------------------
-* SOLR-13350: Multithreaded search execution (Ishan Chattopadhyaya, Mark Miller, Christine Poerschke, David Smiley, noble)
+* SOLR-13350, SOLR-17298: Opt-in multithreaded search execution (Ishan Chattopadhyaya, Mark Miller, Christine Poerschke, David Smiley, noble, Gus Heck)
 
 * SOLR-17192: Put an UpdateRequestProcessor-enforced soft-limit on the number of fields allowed in a core.  The `NumFieldLimitingUpdateRequestProcessorFactory`
   limit may be adjusted by raising the factory's `maxFields` setting, toggled in and out of "warning-only" mode using the `warnOnly` setting, or disabled entirely
diff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
index b7c080ec3b5..3c558feffc3 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
@@ -371,7 +371,7 @@ public class QueryComponent extends SearchComponent {
       return;
     }
 
-    final boolean multiThreaded = params.getBool("multiThreaded", true);
+    final boolean multiThreaded = params.getBool(CommonParams.MULTI_THREADED, false);
 
     // -1 as flag if not set.
     long timeAllowed = params.getLong(CommonParams.TIME_ALLOWED, -1L);
diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/configuring-solr-xml.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/configuring-solr-xml.adoc
index c324600d0ce..6dff9824a73 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/configuring-solr-xml.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/configuring-solr-xml.adoc
@@ -180,6 +180,7 @@ Specifies the number of threads that will be assigned to replay updates in paral
 This pool is shared for all cores of the node.
 The default value is equal to the number of processors.
 
+[#indexSearcherExecutorThreads]
 `indexSearcherExecutorThreads`::
 +
 [%autowidth,frame=none]
diff --git a/solr/solr-ref-guide/modules/query-guide/pages/common-query-parameters.adoc b/solr/solr-ref-guide/modules/query-guide/pages/common-query-parameters.adoc
index 66f7d8ed572..ce6d445bea6 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/common-query-parameters.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/common-query-parameters.adoc
@@ -400,6 +400,16 @@ If early termination is used, a `segmentTerminatedEarly` header will be included
 
 Similar to using <<timeAllowed Parameter,the `timeAllowed` Parameter>>, when early segment termination happens values such as `numFound`, xref:faceting.adoc[Facet] counts, and result xref:stats-component.adoc[Stats] may not be accurate for the entire result set.
 
+== multiThreaded Parameter
+
+[%autowidth,frame=none]
+|===
+|Optional |Default: `false`
+|===
+
+This parameter set to `true` or `false` controls if Solr may use more than one thread to satisfy the request.
+A `true` value presently allows the IndexSearcher to search across Lucene's segments in parallel, and the xref:configuration-guide:configuring-solr-xml.adoc#indexSearcherExecutorThreads[indexSearcherExecutorThreads] value can be customised in the `solr.xml` file. This parameter is ignored in the presence of `&segmentsTerminateEarly=true` (future work may enable it). This is a new parameter and is considered experimental and subject to change or removal in subsequent releases. Please shar [...]
+
 == omitHeader Parameter
 
 [%autowidth,frame=none]
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
index 9fca76238b3..4e94b1d97c6 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
@@ -167,6 +167,9 @@ public interface CommonParams {
   /** Timeout value in milliseconds. If not set, or the value is &lt; 0, there is no timeout. */
   String TIME_ALLOWED = "timeAllowed";
 
+  /** Whether or not the search may use the multi-threaded logic */
+  String MULTI_THREADED = "multiThreaded";
+
   /**
    * Maximum query CPU usage value in milliseconds. If not set, or the value is &lt; 0, there is no
    * timeout.