Repository: reef
Updated Branches:
  refs/heads/master 314928725 -> 72dc29147


[REEF-1338] Race condition in Evaluator shutdown

This addressed the issue by
  * Change to check for done_evaluator instead of stop_evaluator in Evaluator 
shutdown.

JIRA:
  [REEF-1338](https://issues.apache.org/jira/browse/REEF-1338)

Pull Request:
  This closes #951


Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/72dc2914
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/72dc2914
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/72dc2914

Branch: refs/heads/master
Commit: 72dc29147d795ff09e2bfde367008d1ebc925917
Parents: 3149287
Author: Andrew Chung <[email protected]>
Authored: Wed Apr 13 14:17:04 2016 -0700
Committer: Markus Weimer <[email protected]>
Committed: Wed Apr 13 17:21:27 2016 -0700

----------------------------------------------------------------------
 .../Runtime/Evaluator/EvaluatorRuntime.cs                    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/72dc2914/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/EvaluatorRuntime.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/EvaluatorRuntime.cs 
b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/EvaluatorRuntime.cs
index cc78815..45ff233 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/EvaluatorRuntime.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/EvaluatorRuntime.cs
@@ -85,15 +85,17 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator
                 }
                 else if (_state == State.DONE)
                 {
-                    if (message.stop_evaluator != null)
+                    if (message.done_evaluator != null)
                     {
                         Logger.Log(Level.Info, "Received ACK from Driver, 
shutting down Evaluator.");
                         _clock.Dispose();
 
                         return;
                     }
-
-                    Handle(new InvalidOperationException("Received a control 
message from Driver after Evaluator is done."));
+                    else
+                    {
+                        Handle(new InvalidOperationException("Received a 
control message from Driver after Evaluator is done."));
+                    }
                 }
                 else if (_state != State.RUNNING)
                 {

Reply via email to