Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/9084#discussion_r41826446
--- Diff: core/src/main/scala/org/apache/spark/storage/MemoryStore.scala ---
@@ -37,15 +37,14 @@ private case class MemoryEntry(value: Any, size: Long,
deserialized: Boolean)
private[spark] class MemoryStore(blockManager: BlockManager,
memoryManager: MemoryManager)
extends BlockStore(blockManager) {
+ // Note: all changes to memory allocations, notably putting blocks,
evicting blocks, and
+ // acquiring or releasing unroll memory, must be synchronized on
`memoryManager`!
+
private val conf = blockManager.conf
private val entries = new LinkedHashMap[BlockId, MemoryEntry](32, 0.75f,
true)
- private val maxMemory = memoryManager.maxStorageMemory
-
- // Ensure only one thread is putting, and if necessary, dropping blocks
at any given time
- private val accountingLock = new Object
// A mapping from taskAttemptId to amount of memory used for unrolling a
block (in bytes)
- // All accesses of this map are assumed to have manually synchronized on
`accountingLock`
+ // All accesses of this map are assumed to have manually synchronized on
`memoryManager`
--- End diff --
Does this imply that `unrollMemoryMap` should live inside of
`memoryManager`?
---
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]