conductor icon indicating copy to clipboard operation
conductor copied to clipboard

BUG: Timed out task remain pollable

Open nbraquart opened this issue 9 years ago • 1 comments

Hello,

I was testing the error management in conductor, and in particular the handling of timeouts (both response time out, and "global" task time out).

At first, I thought it did not work as tasks were not timed out, I got it solved by binding a workflow sweeper as an eager singleton.

I then faced two problems:

  1. Only task with IN_PROGRESS status are timed out, nothing happens for SCHEDULED tasks. Cf https://github.com/Netflix/conductor/blob/master/core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java#L345 => shouldn't the check for IN_PROGRESS status be removed? (also it makes the test for isTerminal useless)

  2. Then, when I got some timed out tasks (after a longer delay than configured though), a new one got created with status scheduled. However, both timed out and scheduled tasks showed up when polling for tasks, and tasks with status TIMED_OUT got back in IN_PROGRESS status => shouldn't timed out tasks be not visible to workers? Because in the current situation, unless I am mistaken, it means the workers are polluted with tasks that should no longer be considered.

Thanks in advance for the response!

Nicolas

nbraquart avatar May 31 '17 07:05 nbraquart

  1. The TIMED_OUT status is applicable only to IN_PROGRESS tasks because, if a worker is not polling for a specific task due to some maintenance issue, the workflow should still stay in RUNNING state and then proceed with the task once the worker for that task comes back up and starts polling for it again.

  2. This behavior should be fixed and TIMED_OUT tasks should not be available to be polled by the worker. Please reopen if you run into this issue again.

apanicker-nflx avatar Jan 22 '19 00:01 apanicker-nflx