reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Weimer <>
Subject Re: [Discuss] How to deal with `ITask.Dispose()` / `Task.close()` exceptions
Date Tue, 18 Apr 2017 18:30:54 GMT
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?


On Tue, Apr 18, 2017 at 11:24 AM, Julia Wang (QIUHE)
<> 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 []
> Sent: Tuesday, April 18, 2017 11:15 AM
> To: REEF Developers Mailinglist <>
> 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
>   * 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.
> Markus

View raw message