Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Added code comment explaining why this thread pool is unbounded

Shalin Shekhar Mangar8e929f346896
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
index 0273b0a428c..a927ed5264d 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
@@ -40,7 +40,14 @@ import java.util.concurrent.Executors;
public class UpdateShardHandler {
private static Logger log = LoggerFactory.getLogger(UpdateShardHandler.class);
-
+
+ /*
+ * A downside to configuring an upper bound will be big update reorders (when that upper bound is hit)
+ * and then undetected shard inconsistency as a result.
+ * This update executor is used for different things too... both update streams (which may be very long lived)
+ * and control messages (peersync? LIR?) and could lead to starvation if limited.
+ * Therefore this thread pool is left unbounded. See SOLR-8205
+ */
private ExecutorService updateExecutor = ExecutorUtil.newMDCAwareCachedThreadPool(
new SolrjNamedThreadFactory("updateExecutor"));