Browse Source

commit 531d88df88bcb5ed1130446948cef17dd1a4d269
Author: Luke Lu <llu@yahoo-inc.com>
Date: Fri Feb 11 11:36:00 2011 -0800

Fix a task state corrupting race

+++ b/YAHOO-CHANGES.txt
+ Fix a task state corrupting race. (llu)
+


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077791 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 years ago
parent
commit
de8ff44f55
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/mapred/org/apache/hadoop/mapred/TaskTracker.java

+ 3 - 2
src/mapred/org/apache/hadoop/mapred/TaskTracker.java

@@ -2419,12 +2419,13 @@ public class TaskTracker implements MRConstants, TaskUmbilicalProtocol,
           ((this.taskStatus.getRunState() == TaskStatus.State.COMMIT_PENDING ||
            this.taskStatus.getRunState() == TaskStatus.State.FAILED_UNCLEAN ||
            this.taskStatus.getRunState() == TaskStatus.State.KILLED_UNCLEAN) &&
-           taskStatus.getRunState() == TaskStatus.State.RUNNING)) {
+           (taskStatus.getRunState() == TaskStatus.State.RUNNING ||
+            taskStatus.getRunState() == TaskStatus.State.UNASSIGNED))) {
         //make sure we ignore progress messages after a task has 
         //invoked TaskUmbilicalProtocol.done() or if the task has been
         //KILLED/FAILED/FAILED_UNCLEAN/KILLED_UNCLEAN
         //Also ignore progress update if the state change is from 
-        //COMMIT_PENDING/FAILED_UNCLEAN/KILLED_UNCLEA to RUNNING
+        //COMMIT_PENDING/FAILED_UNCLEAN/KILLED_UNCLEA to RUNNING or UNASSIGNED
         LOG.info(task.getTaskID() + " Ignoring status-update since " +
                  ((this.done) ? "task is 'done'" : 
                                 ("runState: " + this.taskStatus.getRunState()))