You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/28 02:36:25 UTC

[GitHub] [spark] AngersZhuuuu commented on a change in pull request #28541: [SPARK-31720][CORE] TaskMemoryManager allocate failed when new task coming

AngersZhuuuu commented on a change in pull request #28541:
URL: https://github.com/apache/spark/pull/28541#discussion_r446591334



##########
File path: core/src/main/scala/org/apache/spark/memory/ExecutionMemoryPool.scala
##########
@@ -105,11 +106,12 @@ private[memory] class ExecutionMemoryPool(
       lock.notifyAll()
     }
 
+    var waitTimes = 0
     // Keep looping until we're either sure that we don't want to grant this request (because this
     // task would have more than 1 / numActiveTasks of the memory) or we have enough free
     // memory to give it (we always let each task get at least 1 / (2 * numActiveTasks)).
     // TODO: simplify this to limit each task to its own slot
-    while (true) {
+    while (waitTimes < 3) {

Review comment:
       > This doesn't look like a general optimization to me, but depends on the specific runtime environment.
   
   Yeah, only optimize some special case




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org