elasticsearch/server
Artem Prigoda e622101ac9
Fix TasksIT#testGetTaskWaitForCompletionWithoutStoringResult (#108094)
It seems that the failure (the missed index) has always existed in the test scenario and it's supposed to be handled by TransportGetTaskAction.java. We catch IndexNotFoundException here and convert it to ResourceNotFoundException. Then we catch ResourceNotFoundException here and return a snapshot of a task as a response.

In the stack trace, getFinishedTaskFromIndex was called from getRunningTaskFromNode, not from waitedForCompletion due to a race between creating a get request and unblocking request which are sent asynchronously. I've changed the waitForCompletionTestCase test method to unblock the task only after the request started waiting for the task completion by registering a removal listener. By doing so, we make sure we test the "wait for completion" branch when task is running.

The part about the missed index seems to irrelevant, since waitedForCompletion is able to suppress the error and return a snapshot of running task which is not possible if getFinishedTaskFromIndex gets called directly from getRunningTaskFromNode.

Resolves #107823
2024-05-29 09:15:02 +02:00
..
licenses Implement custom JUL bridge (#96872) 2023-06-20 09:48:25 -07:00
src Fix TasksIT#testGetTaskWaitForCompletionWithoutStoringResult (#108094) 2024-05-29 09:15:02 +02:00
build.gradle Add an optimised int8 vector distance function for aarch64. (#106133) 2024-04-12 08:44:21 +01:00