Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-15953: remove unused LTRThreadModule.preClose CloseHook logic (#562)

Christine Poerschke957c57da6d8c
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 51ca2fc6f74..2a84ba31786 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 f1b2216e9b7..2f5c337d271 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 &lt; 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;
}