Skip to content

fail fast in indexParallel() on ExecutionException #4705

Open
@vladak

Description

@vladak

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():

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions