Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/4887#discussion_r28416270
--- Diff: core/src/main/scala/org/apache/spark/storage/MemoryStore.scala ---
@@ -295,9 +296,9 @@ private[spark] class MemoryStore(blockManager:
BlockManager, maxMemory: Long)
// In this case, we should release the memory after we cache the
block there.
// Otherwise, if we return an iterator, we release the memory
reserved here
// later when the task finishes.
- if (keepUnrolling) {
- accountingLock.synchronized {
- val amountToRelease = currentUnrollMemoryForThisThread -
previousMemoryReserved
+ accountingLock.synchronized {
--- End diff --
This grabs the lock unconditionally now; why not put it inside the if block?
I'm not as qualified to review this but it seems like you are always
unrolling if the storage level includes disk, not just if it includes memory,
which aren't the same thing. I think you might also have to explain the call to
`blockManager.memoryStore.releasePendingUnrollMemoryForThisThread()` above.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]