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 6579584 SOLR-15953: remove unused LTRThreadModule.preClose CloseHook
logic (#562)
6579584 is described below
commit 6579584d31e7964edf315be04417c2cdb032fe01
Author: Christine Poerschke <[email protected]>
AuthorDate: Tue Jan 25 17:26:20 2022 +0000
SOLR-15953: remove unused LTRThreadModule.preClose CloseHook logic (#562)
(cherry picked from commit 957c57da6d8cb790fcbb33ae09ba371384574499)
---
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 c003d0c..e7fb93c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -500,6 +500,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;
}