Last active
July 31, 2024 14:16
-
-
Save ozlerhakan/e4d11bddae6a2f89d2c212c220f4c965 to your computer and use it in GitHub Desktop.
backup-restore-patch.solr9.6.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java | |
index d2d823eb190..2d4a7431e29 100644 | |
--- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java | |
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java | |
@@ -432,6 +432,8 @@ public class CoreAdminHandler extends RequestHandlerBase implements PermissionNa | |
public static final String COMPLETED = "completed"; | |
public static final String FAILED = "failed"; | |
public final Map<String, Map<String, TaskObject>> requestStatusMap; | |
+ private final int maxExpensiveThreads = | |
+ Integer.parseInt(System.getProperty("solr.maxExpensiveTaskThreads", "5")); | |
// Executor for all standard tasks (the ones that are not flagged as expensive) | |
// We always keep 50 live threads | |
@@ -442,9 +444,8 @@ public class CoreAdminHandler extends RequestHandlerBase implements PermissionNa | |
// Executor for expensive tasks | |
// We keep the number number of max threads very low to have throttling for expensive tasks | |
private ExecutorService expensiveExecutor = | |
- ExecutorUtil.newMDCAwareCachedThreadPool( | |
- 5, | |
- Integer.MAX_VALUE, | |
+ ExecutorUtil.newMDCAwareFixedThreadPool( | |
+ maxExpensiveThreads, | |
new SolrNamedThreadFactory("parallelCoreAdminAPIExpensiveExecutor")); | |
public CoreAdminAsyncTracker() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment