zacharymorn commented on a change in pull request #2567:
URL: https://github.com/apache/lucene-solr/pull/2567#discussion_r705101495



##########
File path: lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
##########
@@ -465,9 +493,22 @@ public void setChecksumsOnly(boolean v) {
   
   private boolean checksumsOnly;
 
-  /** Set infoStream where messages should go.  If null, no
-   *  messages are printed.  If verbose is true then more
-   *  details are printed. */
+  /** Set threadCount used for parallelizing index integrity checking. */
+  public void setThreadCount(int tc) {
+    if (tc <= 0) {
+      throw new IllegalArgumentException(
+          "setThreadCount requires a number larger than 0, but got: " + tc);
+    }
+    threadCount = tc;
+  }
+
+  // capped threadCount at 4 for default
+  private int threadCount = 
Math.min(Runtime.getRuntime().availableProcessors(), 4);

Review comment:
       I have actually updated that in the other PR for updating instruction as 
well (since the updated instruction also mentioned about the number of CPU 
cores for default) https://github.com/apache/lucene/pull/281, and plan to add 
that commit into this PR once it is merged. Would you like me to track this 
separately instead?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to