You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/09/08 21:08:59 UTC
[GitHub] [lucene-solr] mikemccand commented on a change in pull request #2567: LUCENE-9662: CheckIndex should be concurrent (backporting)
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org