Skip to content

Commit 957c57d

Browse files
authored
SOLR-15953: remove unused LTRThreadModule.preClose CloseHook logic (#562)
1 parent 86bf5e8 commit 957c57d

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

solr/CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ Other Changes
522522

523523
* SOLR-15934: CloseHook is now an interface with default method implementations instead of an abstract class. (Mike Drob)
524524

525+
* SOLR-15953: Remove unused LTRThreadModule.preClose CloseHook logic. (Christine Poerschke)
526+
525527
* SOLR-15916: Remove dist/ from the binary release. The solr-core and solrj jars will be included in the server WEB-INF/lib directory,
526528
and each individual module's jar will be included in its directory's lib/ folder. (Houston Putman)
527529

solr/modules/ltr/src/java/org/apache/solr/ltr/LTRThreadModule.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@
2020
import java.util.concurrent.ExecutorService;
2121
import java.util.concurrent.Semaphore;
2222

23-
import org.apache.solr.common.util.ExecutorUtil;
2423
import org.apache.solr.common.util.NamedList;
25-
import org.apache.solr.core.CloseHook;
26-
import org.apache.solr.core.SolrCore;
2724
import org.apache.solr.util.SolrPluginUtils;
2825
import org.apache.solr.util.plugin.NamedListInitializedPlugin;
2926

@@ -56,7 +53,7 @@
5653
* <code>totalPoolThreads</code> imposes a contention between the queries if
5754
* <code>(totalPoolThreads &lt; numThreadsPerRequest * total parallel queries)</code>.
5855
*/
59-
public final class LTRThreadModule implements CloseHook, NamedListInitializedPlugin {
56+
public final class LTRThreadModule implements NamedListInitializedPlugin {
6057

6158
public static LTRThreadModule getInstance(NamedList<?> args) {
6259

@@ -163,13 +160,6 @@ public void execute(Runnable command) {
163160
createWeightScoreExecutor.execute(command);
164161
}
165162

166-
@Override
167-
public void preClose(SolrCore core) {
168-
// TODO: Investigate...
169-
// All uses of setExecutor use the core container's update executor, which could impact other cores?
170-
ExecutorUtil.shutdownAndAwaitTermination(createWeightScoreExecutor);
171-
}
172-
173163
public void setExecutor(ExecutorService sharedExecutor) {
174164
this.createWeightScoreExecutor = sharedExecutor;
175165
}

0 commit comments

Comments
 (0)