You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by Andrey Meleshko <an...@microsoft.com> on 2016/07/19 23:15:18 UTC

how to cancel task initialization

Trying this as part of IMRU testing, but it seem to touch problem in reef core.


1)      As part of ContextManager.StartTask() we are calling into OperatorTopology.Initialize(), which blocks the thread waiting for all child tasks to register.
if any of the child nodes failed to register (for instance: evaluator failure on startup), Master node will hang around until configured timeout expires (current default timeout in reef-1251 is ~1 hour)
As I understand, In case of IMRU, UpdateTask node has Map nodes as children. So if any of the Map evaluators crash during task start,
this blocks IMRU driver restart for at least 1h (default)....or timeout parameters job definition specified (IMRU driver is waiting for all task to switch into final state)

Is there a way or jira on how to shutdown master node, so that it doesn't wait for the child registration timeout?


2)      Side observation: Currently when ContextManager.StartTask() locks access on (_contextlock) object.
The same object is used to lock Dispose() method. So if StartTask() takes long time, Dispose() will be blocked as well.

Thank you,
/andrey

Re: how to cancel task initialization

Posted by Markus Weimer <ma...@weimo.de>.
On 2016-07-19 16:15, Andrey Meleshko wrote:
> 1) As part of ContextManager.StartTask() we are calling into
> OperatorTopology.Initialize(), which blocks the thread waiting for
> all child tasks to register. if any of the child nodes failed to
> register (for instance: evaluator failure on startup), Master node
> will hang around until configured timeout expires (current default
> timeout in reef-1251 is ~1 hour)

This seems to be the subject of REEF-1480. The current setup is far from 
optimal :)


> Is there a way or jira on how to shutdown master node, so that it
> doesn't wait for the child registration timeout?

You can always call `IRunningTask.Close()` to shut down a Task. That 
said, I am not certain that the implementation of the IMRU Tasks would 
honor that, given their locking structure.

> 2)      Side observation: Currently when ContextManager.StartTask()
> locks access on (_contextlock) object. The same object is used to
> lock Dispose() method. So if StartTask() takes long time, Dispose()
> will be blocked as well.

Thanks! This sounds like a potential bug. Can you file a JIRA?

Thanks

Markus