Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11613#discussion_r55896680
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala 
---
    @@ -793,7 +798,12 @@ private[spark] class BlockManager(
             // We will drop it to disk later if the memory store can't hold it.
             val putSucceeded = if (level.deserialized) {
               val values = dataDeserialize(blockId, bytes.duplicate())
    -          memoryStore.putIterator(blockId, values, level).isRight
    +          memoryStore.putIterator(blockId, values, level) match {
    +            case Right(_) => true
    +            case Left(iter) =>
    +              iter.close()
    --- End diff --
    
    ```
    // If putting deserialized values in memory failed, we will put the bytes 
directly to disk,
    // so we don't need this iterator and we can close it to free resources 
earlier.
    ```


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