Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
We should use Thread instead of Task to run user's REEF Task to simplify Exception handling. The main motivation to move is the following use-case:
On an unhandled Exception on the REEF system side, we would like to fail the Evaluator and have it relay a message back to the Driver. For this purpose, we will bind a handler for AppDomain.CurrentDomain.UnhandledException. However, this does not work for Tasks. The Task equivalent, TaskScheduler.UnobservedTaskException, only triggers when a Task gets GC'd, which may be a long time after a Task fails unless GC is forced. In addition, Tasks do not crash a process in C# 4.5, so if an Unhandled Exception is not observed on our part, there is a possibility that it remains unobserved for a long time which may cause system state to become corrupted and unstable.
We should thus switch to use Thread to simplify the Exception handling in the REEF.NET Evaluator.
Attachments
Issue Links
- blocks
-
REEF-1364 C# Evaluator should attempt to send a failure message back to the Driver on an unhandled Exception
- Resolved
- links to