Skip to content

Commit d8be669

Browse files
author
Andrew Or
committed
Fix unintended change
1 parent cd0c680 commit d8be669

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/memory/ExecutionMemoryPool.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private[memory] class ExecutionMemoryPool(
131131
// We want to let each task get at least 1 / (2 * numActiveTasks) before blocking;
132132
// if we can't give it this much now, wait for other tasks to free up memory
133133
// (this happens if older tasks allocated lots of memory before N grew)
134-
if (memoryFree >= math.min(maxToGrant, poolSize / minMemoryPerTask)) {
134+
if (memoryFree >= math.min(maxToGrant, minMemoryPerTask - curMem)) {
135135
memoryForTask(taskAttemptId) += toGrant
136136
return toGrant
137137
} else {

0 commit comments

Comments
 (0)