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 2022/01/25 17:27:04 UTC
[solr] branch main updated: SOLR-15953: remove unused LTRThreadModule.preClose CloseHook logic (#562)
This is an automated email from the ASF dual-hosted git repository.
cpoerschke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 957c57d SOLR-15953: remove unused LTRThreadModule.preClose CloseHook logic (#562)
957c57d is described below
commit 957c57da6d8cb790fcbb33ae09ba371384574499
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Tue Jan 25 17:26:20 2022 +0000
SOLR-15953: remove unused LTRThreadModule.preClose CloseHook logic (#562)
---
solr/CHANGES.txt | 2 ++
.../ltr/src/java/org/apache/solr/ltr/LTRThreadModule.java | 12 +-----------
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 51ca2fc..2a84ba3 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -522,6 +522,8 @@ Other Changes
* SOLR-15934: CloseHook is now an interface with default method implementations instead of an abstract class. (Mike Drob)
+* SOLR-15953: Remove unused LTRThreadModule.preClose CloseHook logic. (Christine Poerschke)
+
* SOLR-15916: Remove dist/ from the binary release. The solr-core and solrj jars will be included in the server WEB-INF/lib directory,
and each individual module's jar will be included in its directory's lib/ folder. (Houston Putman)
diff --git a/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRThreadModule.java b/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRThreadModule.java
index f1b2216..2f5c337 100644
--- a/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRThreadModule.java
+++ b/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRThreadModule.java
@@ -20,10 +20,7 @@ import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Semaphore;
-import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.common.util.NamedList;
-import org.apache.solr.core.CloseHook;
-import org.apache.solr.core.SolrCore;
import org.apache.solr.util.SolrPluginUtils;
import org.apache.solr.util.plugin.NamedListInitializedPlugin;
@@ -56,7 +53,7 @@ import org.apache.solr.util.plugin.NamedListInitializedPlugin;
* <code>totalPoolThreads</code> imposes a contention between the queries if
* <code>(totalPoolThreads < numThreadsPerRequest * total parallel queries)</code>.
*/
-public final class LTRThreadModule implements CloseHook, NamedListInitializedPlugin {
+public final class LTRThreadModule implements NamedListInitializedPlugin {
public static LTRThreadModule getInstance(NamedList<?> args) {
@@ -163,13 +160,6 @@ public final class LTRThreadModule implements CloseHook, NamedListInitializedPlu
createWeightScoreExecutor.execute(command);
}
- @Override
- public void preClose(SolrCore core) {
- // TODO: Investigate...
- // All uses of setExecutor use the core container's update executor, which could impact other cores?
- ExecutorUtil.shutdownAndAwaitTermination(createWeightScoreExecutor);
- }
-
public void setExecutor(ExecutorService sharedExecutor) {
this.createWeightScoreExecutor = sharedExecutor;
}