Skip to content

Commit

Permalink
SOLR-15953: remove unused LTRThreadModule.preClose CloseHook logic (#562
Browse files Browse the repository at this point in the history
)

(cherry picked from commit 957c57d)
  • Loading branch information
cpoerschke committed Jan 25, 2022
1 parent b88ad33 commit 6579584
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 2 additions & 0 deletions solr/CHANGES.txt
Expand Up @@ -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)

Expand Down
Expand Up @@ -20,10 +20,7 @@
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;

Expand Down Expand Up @@ -56,7 +53,7 @@
* <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) {

Expand Down Expand Up @@ -163,13 +160,6 @@ public void execute(Runnable command) {
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;
}
Expand Down

0 comments on commit 6579584

Please sign in to comment.