Github user ConeyLiu commented on a diff in the pull request:
https://github.com/apache/spark/pull/20676#discussion_r171115071
--- Diff:
core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala ---
@@ -246,18 +246,18 @@ private[spark] class MemoryStore(
val amountToRequest = size - unrollMemoryUsedByThisBlock
keepUnrolling = reserveUnrollMemoryForThisTask(blockId,
amountToRequest, memoryMode)
if (keepUnrolling) {
- unrollMemoryUsedByThisBlock += amountToRequest
+ unrollMemoryUsedByThisBlock = size
}
+ } else if (size < unrollMemoryUsedByThisBlock) {
--- End diff --
In #19285, we first release `unrollMemoryUsedByThisBlock` unroll memory,
and then we request `entry.size` storage memory. So, there is no waste of
resources here.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]