Allow indexing/query works to be cancelled upon timeout or by the user

Description

Implement cancellation of indexing works simply by allowing the user to call cancel() on the returned future.

In the work processing thread, if the future is complete with a CancellationException, we'll just skip the corresponding work. If it's not, we'll send the work to the REST client and add an exception handler (.exceptionally(...) to the user-returned future: if the future is completed with a CancellationException, we'll cancel the HTTP request (is it possible?).

Environment

None

Status

Assignee

Unassigned

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Fix versions

Priority

Major
Configure