Github user suyanNone commented on the pull request:

    https://github.com/apache/spark/pull/4887#issuecomment-155985114
  
    eh... 
    the earlier version is add a 
`blockManager.memoryStore.releasePendingUnrollMemoryForThisThread()` in [this 
line](https://github.com/apache/spark/blob/6cd98c1878a9c5c6475ed5974643021ab27862a7/core/src/main/scala/org/apache/spark/CacheManager.scala#L184).
    
    but the `pendingUnrollMemory` is just stored unrolled success memory, not 
for the unrolled failed memory. so it is useless to call 
`blockManager.memoryStore.releasePendingUnrollMemoryForThisThread()`.  Unless 
we change `pendingUnrollMemory` to store  unroll memory for unrolled failed  
`MEMORY_AND_DISK` block and unrolled successful block. 
    
    and memoryStore had another api: 
(1)`blockManager.memoryStore.releaseUnrollMemoryForThisThread()` or 
(2)`blockManager.memoryStore.releaseUnrollMemoryForThisThread(SomeMemorySize)`, 
`unrollMemoryMap` is used store unroll memory for unrolling and unrolled failed 
blocks.  if we call (1) after [this 
line](https://github.com/apache/spark/blob/6cd98c1878a9c5c6475ed5974643021ab27862a7/core/src/main/scala/org/apache/spark/CacheManager.scala#L184),
 it will release memory for other unrolled failed block.
    if we call (2), we can't got the specific memory for that `MEMORY_AND_DISK` 
block.
    
    
    
    



---
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]

Reply via email to