Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/3629#discussion_r25045986
--- Diff: core/src/main/scala/org/apache/spark/storage/MemoryStore.scala ---
@@ -46,6 +46,7 @@ private[spark] class MemoryStore(blockManager:
BlockManager, maxMemory: Long)
// A mapping from thread ID to amount of memory used for unrolling a
block (in bytes)
// All accesses of this map are assumed to have manually synchronized on
`accountingLock`
private val unrollMemoryMap = mutable.HashMap[Long, Long]()
+ private val pendingUnrollMemoryMap = mutable.HashMap[Long, Long]()
--- End diff --
We need a huge comment above this that explains why we need a separate map:
```
// Same as `unrollMemoryMap`, but for pending unroll memory as defined
below.
// If the complete unrolling of a particular block is successful, we should
// release the memory reserved in the process *as soon as* we finish caching
// the corresponding block and not wait until after the task finishes.
Then,
// pending unroll memory refers to the intermediate amount of memory
occupied
// by a thread after the unroll but before the actual putting of the block
in
// the cache is referred to as the pending unroll memory (SPARK-4777).
private val pendingUnrollMemoryMap = mutable.HashMap[Long, Long]()
```
---
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]