Updated Branches:
  refs/heads/branch-0.9 1280e8afd -> 574741f28

Merge pull request #493 from kayousterhout/double_add

Fixed bug where task set managers are added to queue twice

@mateiz can you verify that this is a bug and wasn't intentional? 
(https://github.com/apache/incubator-spark/commit/90a04dab8d9a2a9a372cea7cdf46cc0fd0f2f76c#diff-7fa4f84a961750c374f2120ca70e96edR551)

This bug leads to a small performance hit because task
set managers will get offered each rejected resource
offer twice, but doesn't lead to any incorrect functionality.

Thanks to @hdc1112 for pointing this out.
(cherry picked from commit 5bcfd798117e8617e604c1dd3b5c9b67e83100bb)

Signed-off-by: Patrick Wendell <pwend...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/574741f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/574741f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/574741f2

Branch: refs/heads/branch-0.9
Commit: 574741f2829255c5be8b2945e01e07cf849aa8f2
Parents: 1280e8a
Author: Matei Zaharia <ma...@databricks.com>
Authored: Wed Jan 22 14:05:48 2014 -0800
Committer: Patrick Wendell <pwend...@gmail.com>
Committed: Mon Feb 3 22:40:55 2014 -0800

----------------------------------------------------------------------
 .../src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/574741f2/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala 
b/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
index 73d6972..ccd7f6f 100644
--- a/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
+++ b/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
@@ -592,7 +592,7 @@ private[spark] class TaskSetManager(
   override def removeSchedulable(schedulable: Schedulable) {}
 
   override def getSortedTaskSetQueue(): ArrayBuffer[TaskSetManager] = {
-    var sortedTaskSetQueue = ArrayBuffer[TaskSetManager](this)
+    var sortedTaskSetQueue = new ArrayBuffer[TaskSetManager]()
     sortedTaskSetQueue += this
     sortedTaskSetQueue
   }

Reply via email to