reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julia Wang (QIUHE)" <Qiuhe.W...@microsoft.com.INVALID>
Subject RE: [Discuss] How to deal with `ITask.Dispose()` / `Task.close()` exceptions
Date Tue, 18 Apr 2017 18:37:36 GMT
In fault tolerant scenarios, we need to know if an evaluator is still re-usable in recovery
case.

-----Original Message-----
From: Julia Wang (QIUHE) [mailto:Qiuhe.Wang@microsoft.com.INVALID] 
Sent: Tuesday, April 18, 2017 11:34 AM
To: dev@reef.apache.org
Subject: RE: [Discuss] How to deal with `ITask.Dispose()` / `Task.close()` exceptions

I remember the original thinking was if dispose throws exception, meaning the resource was
not cleared most possibly, therefore we should crash the Evaluator.

-----Original Message-----
From: Markus Weimer [mailto:markus@weimo.de]
Sent: Tuesday, April 18, 2017 11:31 AM
To: REEF Developers Mailinglist <dev@reef.apache.org>
Subject: Re: [Discuss] How to deal with `ITask.Dispose()` / `Task.close()` exceptions

Before we jump to solutions, let's first decide on the right semantics:

Should Exceptions thrown in `ITask.Dispose()` and `Task.close()` constitute a `TaskFailure`?
That is: Even if the `Call` / `call` method returned without failure, we still declare the
Task a failure?

Markus

On Tue, Apr 18, 2017 at 11:24 AM, Julia Wang (QIUHE) <Qiuhe.Wang@microsoft.com.invalid>
wrote:
> Looks like we shall call SetException(e) in the catch block of the Dispose() instead
of throw  InvalidOperationException. That makes more sense than crashing the evaluator.  Is
this what you tried? We can look at tests failures after the change. We have some test cases
that throw exceptions inside Dispose. If behavior is changed, the expectation would also need
to be modified.
>
> Julia
>
> -----Original Message-----
> From: Markus Weimer [mailto:markus@weimo.de]
> Sent: Tuesday, April 18, 2017 11:15 AM
> To: REEF Developers Mailinglist <dev@reef.apache.org>
> Subject: [Discuss] How to deal with `ITask.Dispose()` / `Task.close()` 
> exceptions
>
> Hi,
>
> I noticed an imprecision in how we deal with exceptions in `Task.close()` in Java or
`ITask.Dispose()`:
>
>   * REEF.NET today crashes the Evaluator when such an exception occurs, but after a result
or other exception is sent to the Driver.
>
>   * REEF/Java sends such a exception to the Driver, but potentially after also sending
a result or prior exception to the Driver. This probably leads to Driver failure.
>
> How do we want to deal with this? My gut feeling is that throwing exceptions in `.Dispose()`
or `.Close()` should constitute a Task failure. However, when I change REEF.NET that way,
many of our own tests fail.
>
> WDYT?
>
> Markus
Mime
View raw message