From 5e1bf4b34b9d6825090f9fc32dd5d66928e6df9c Mon Sep 17 00:00:00 2001 From: Houston Putman Date: Thu, 13 Feb 2025 17:05:29 -0600 Subject: [PATCH] SOLR-17673: Disable multithreaded search at the node level by default --- solr/CHANGES.txt | 4 ++++ solr/core/src/java/org/apache/solr/core/NodeConfig.java | 3 +-- .../upgrade-notes/pages/major-changes-in-solr-9.adoc | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index b3184eb3740..359d7a460bd 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -190,6 +190,10 @@ Bug Fixes * SOLR-17652: Fix a bug that could cause long leader elections to leave PULL replicas in DOWN state forever. (hossman) +* SOLR-17673: Disable multi-threaded search execution by default at the node-level. + Users can still opt-in by providing a "indexSearcherExecutorThreads" > 0. + (Houston Putman, Varun Thacker, David Smiley, Luke Kot-Zaniewski) + Dependency Upgrades --------------------- * SOLR-17471: Upgrade Lucene to 9.12.1. (Pierre Salagnac, Christine Poerschke) diff --git a/solr/core/src/java/org/apache/solr/core/NodeConfig.java b/solr/core/src/java/org/apache/solr/core/NodeConfig.java index 72ec1bd5ee0..439a922d1df 100644 --- a/solr/core/src/java/org/apache/solr/core/NodeConfig.java +++ b/solr/core/src/java/org/apache/solr/core/NodeConfig.java @@ -627,8 +627,7 @@ public static class NodeConfigBuilder { // No:of core load threads in cloud mode is set to a default of 8 public static final int DEFAULT_CORE_LOAD_THREADS_IN_CLOUD = 8; - public static final int DEFAULT_INDEX_SEARCHER_EXECUTOR_THREADS = - Runtime.getRuntime().availableProcessors(); + public static final int DEFAULT_INDEX_SEARCHER_EXECUTOR_THREADS = 0; private static final String DEFAULT_CORESLOCATORCLASS = "org.apache.solr.core.CorePropertiesLocator"; diff --git a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc index fd15a943f5b..7fbb96353ed 100644 --- a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc +++ b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc @@ -67,6 +67,12 @@ It is always strongly recommended that you fully reindex your documents after a In Solr 8, it was possible to add docValues to a schema without re-indexing via `UninvertDocValuesMergePolicy`, an advanced/expert utility. Due to changes in Lucene 9, that isn't possible any more. +== Solr 9.8.1 +=== Configuration +In solrconfig.xml, the `indexSearcherExecutorThreads` now defaults to 0. +Therefore, multi-threaded search execution is disabled at a node-level by default. +It is currently recommended to only use an `indexSearcherExecutorThreads > 0` if all query requests sent to Solr opt-in to multiThreaded search. + == Solr 9.8 === Configuration In solrconfig.xml, the `numVersionBuckets` and `versionBucketLockTimeoutMs` settings are now obsolete and ignored; a warning will be logged if specified.