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



##########
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:
       Let's be sure to relax this cap (`4`) in a follow-on issue.  I think for 
command-line invocation it's OK to use all cores by default.




-- 
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