Closed
Description
A failure in indexParallel
such as this one:
2024-11-19 08:07:02.605+0000 SEVERE t117 IndexDatabase.indexParallel: 674 successes (98.8%) after aborting parallel-indexing
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.opengrok.indexer.index.IndexDatabase.indexParallel(IndexDatabase.java:2004)
at org.opengrok.indexer.index.IndexDatabase.update(IndexDatabase.java:765)
at org.opengrok.indexer.index.Indexer.lambda$doIndexerExecution$59(Indexer.java:1212)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.OutOfMemoryError: Java heap space
will more often than not have grave consequences on the index, eventually leading to index corruption. Currently such errors are logged only:
opengrok/opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexDatabase.java
Lines 2007 to 2014 in 41b2c23
Instead, these should be reported in the overall index exit code on
so they can be reflected e.g. in the Docker container program which already consults the exit code. Obviously this will be more handy in case of per project reindex as opposed to reindex of many projects at once.