-
Notifications
You must be signed in to change notification settings - Fork 792
Open
Description
If an index task fails in indexParallel() with InterruptedException or ExecutionException exception, it will be detected only once the cycle gets to the respective future when traversing the list and calls future.get():
opengrok/opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexDatabase.java
Lines 2003 to 2006 in 9164e39
| for (var future : futures) { | |
| IndexFileWork work = future.get(); | |
| bySuccess.computeIfAbsent(work.ret, key -> new ArrayList<>()).add(work); | |
| } |
Ideally, this should fail fast, i.e. the first future from the list which exhibited the exception should terminate the processing for given index database.
Came across this when working on PR #4706.